diff options
author | George Hazan <ghazan@miranda.im> | 2020-07-07 14:55:09 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2020-07-07 14:55:09 +0300 |
commit | 70e37537a40297d5cbb566e7f1bd6af85b22f640 (patch) | |
tree | 6aca942dbd31f7c9b02b040235614863ccf7da9e /protocols/JabberG | |
parent | cca308b6079ee778c564c0197756595faf63ec88 (diff) |
Jabber: file inlining doesn't work if a user pastes a file into a groupchat
Diffstat (limited to 'protocols/JabberG')
-rwxr-xr-x | protocols/JabberG/src/jabber_util.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_util.cpp b/protocols/JabberG/src/jabber_util.cpp index aa64fb68e7..e54b85b618 100755 --- a/protocols/JabberG/src/jabber_util.cpp +++ b/protocols/JabberG/src/jabber_util.cpp @@ -572,7 +572,7 @@ char* CJabberProto::GetClientJID(MCONTACT hContact, char *dest, size_t destLen) if (hContact == 0)
return nullptr;
- ptrA jid(getUStringA(hContact, "jid"));
+ ptrA jid(getUStringA(hContact, isChatRoom(hContact) ? "ChatRoomID" : "jid"));
return GetClientJID(jid, dest, destLen);
}
@@ -582,12 +582,11 @@ char* CJabberProto::GetClientJID(const char *jid, char *dest, size_t destLen) return nullptr;
strncpy_s(dest, destLen, jid, _TRUNCATE);
- char *p = strchr(dest, '/');
mir_cslock lck(m_csLists);
JABBER_LIST_ITEM *LI = ListGetItemPtr(LIST_ROSTER, jid);
if (LI != nullptr) {
- if (p == nullptr) {
+ if (strchr(dest, '/')) {
pResourceStatus r(LI->getBestResource());
if (r != nullptr)
strncpy_s(dest, destLen, MakeJid(jid, r->m_szResourceName), _TRUNCATE);
|