diff options
author | George Hazan <george.hazan@gmail.com> | 2014-03-05 17:41:23 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2014-03-05 17:41:23 +0000 |
commit | a7c76155fdb8b92e57912195f14bec579260424f (patch) | |
tree | 84c0d4c57745653fe4ef82bb6e101ed12a06c2a4 /protocols/JabberG | |
parent | 50e9cca2ec06bbae40237f491a3bae80b454928e (diff) |
Jabber:
- chats require the resource to be specified;
- resource info queries reordered not to produce duplicates
git-svn-id: http://svn.miranda-ng.org/main/trunk@8416 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index cff375efed..2d6434985b 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -646,6 +646,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) return 1;
JabberStripJid(jid, szBareJid, SIZEOF(szBareJid));
+ bool bUseResource = ListGetItemPtr(LIST_CHATROOM, szBareJid) != NULL;
if (m_ThreadInfo) {
m_ThreadInfo->send(
@@ -681,12 +682,6 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) pResourceStatus r(item->arResources[i]);
TCHAR tmp[JABBER_MAX_JID_LEN];
mir_sntprintf(tmp, SIZEOF(tmp), _T("%s/%s"), szBareJid, r->m_tszResourceName);
- if (!_tcscmp(tmp, jid))
- continue;
-
- XmlNodeIq iq3(AddIQ(&CJabberProto::OnIqResultLastActivity, JABBER_IQ_TYPE_GET, tmp, JABBER_IQ_PARSE_FROM));
- iq3 << XQUERY(JABBER_FEAT_LAST_ACTIVITY);
- m_ThreadInfo->send(iq3);
if (r->m_jcbCachedCaps & JABBER_CAPS_DISCO_INFO) {
XmlNodeIq iq5(AddIQ(&CJabberProto::OnIqResultCapsDiscoInfoSI, JABBER_IQ_TYPE_GET, tmp, JABBER_IQ_PARSE_FROM | JABBER_IQ_PARSE_CHILD_TAG_NODE | JABBER_IQ_PARSE_HCONTACT));
@@ -699,6 +694,12 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) iq4 << XQUERY(JABBER_FEAT_VERSION);
m_ThreadInfo->send(iq4);
}
+
+ if (!_tcscmp(tmp, jid)) {
+ XmlNodeIq iq3(AddIQ(&CJabberProto::OnIqResultLastActivity, JABBER_IQ_TYPE_GET, tmp, JABBER_IQ_PARSE_FROM));
+ iq3 << XQUERY(JABBER_FEAT_LAST_ACTIVITY);
+ m_ThreadInfo->send(iq3);
+ }
}
}
else if (item->getTemp()->m_dwVersionRequestTime == 0) {
@@ -709,7 +710,7 @@ int __cdecl CJabberProto::GetInfo(MCONTACT hContact, int /*infoType*/) }
}
- SendGetVcard(szBareJid);
+ SendGetVcard(bUseResource ? jid : szBareJid);
return 0;
}
|