From 70e37537a40297d5cbb566e7f1bd6af85b22f640 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 7 Jul 2020 14:55:09 +0300 Subject: Jabber: file inlining doesn't work if a user pastes a file into a groupchat --- protocols/JabberG/src/jabber_util.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'protocols/JabberG') 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); -- cgit v1.2.3