From a44d40439f02ff71a054a84c01ec3052a644d73a Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 30 Oct 2024 20:30:43 +0300 Subject: Jabber: patch for OMEMO --- protocols/JabberG/src/jabber_thread.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'protocols/JabberG/src/jabber_thread.cpp') diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp index cbd8708fbf..b1d5eb28cf 100644 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -1417,8 +1417,12 @@ void CJabberProto::OnProcessMessage(const TiXmlElement *node, ThreadData *info) } // Create a temporary contact, if needed - if (hContact == 0) - hContact = CreateTemporaryContact(from, chatItem); + if (hContact == 0) { + if (item) + hContact = item->hContact; + else + hContact = CreateTemporaryContact(from, chatItem); + } if (!bOffline) CallService(MS_PROTO_CONTACTISTYPING, hContact, PROTOTYPE_CONTACTTYPING_OFF); @@ -1588,7 +1592,7 @@ void CJabberProto::OnProcessPresence(const TiXmlElement *node, ThreadData *info) debugLogA("SKIP Receive presence online from %s (who is not in my roster and not in list - skipping)", from); return; } - hContact = DBCreateContact(from, nick, true, true); + hContact = DBCreateContact(from, nick, true, false); } if (!ListGetItemPtr(LIST_ROSTER, from)) { -- cgit v1.2.3