diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_util.cpp')
-rwxr-xr-x | protocols/JabberG/src/jabber_util.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index 38b4d0bcc4..2ec6c71e85 100755 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -83,13 +83,21 @@ pResourceStatus CJabberProto::ResourceInfoFromJID(const wchar_t *jid) if (jid == nullptr)
return nullptr;
- JABBER_LIST_ITEM *item = ListGetItemPtr(LIST_VCARD_TEMP, jid);
+ const wchar_t *p = wcschr(jid, '/');
+
+ JABBER_LIST_ITEM *item = nullptr;
+ if (p) {
+ wchar_t szJid[JABBER_MAX_JID_LEN];
+ JabberStripJid(jid, szJid, _countof(szJid));
+ item = ListGetItemPtr(LIST_CHATROOM, szJid);
+ }
+ if (item == nullptr)
+ item = ListGetItemPtr(LIST_VCARD_TEMP, jid);
if (item == nullptr)
item = ListGetItemPtr(LIST_ROSTER, jid);
if (item == nullptr)
return nullptr;
- const wchar_t *p = wcschr(jid, '/');
if (p == nullptr)
return item->getTemp();
|