From 0187ea2b4e05a9db837260bb1a581b9e86e280c2 Mon Sep 17 00:00:00 2001 From: sss Date: Sun, 13 Mar 2022 15:40:36 +0300 Subject: omemo: removed outdated comments, added non-standard complient hack for devicelist polling (still need response handler as it is not event and not handled by existing handler) --- protocols/JabberG/src/jabber_thread.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (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 3f23c57079..7aa94ca70c 100755 --- a/protocols/JabberG/src/jabber_thread.cpp +++ b/protocols/JabberG/src/jabber_thread.cpp @@ -941,7 +941,6 @@ void CJabberProto::OnProcessPubsubEvent(const TiXmlElement *node) OmemoHandleDeviceList(from, itemsNode); return; } - //TODO:handle omemo device list } if (m_bEnableUserTune) @@ -1571,6 +1570,16 @@ void CJabberProto::OnProcessPresence(const TiXmlElement *node, ThreadData *info) } hContact = DBCreateContact(from, nick, true, true); } + if (hContact && m_bUseOMEMO) + { + char szBareJid[JABBER_MAX_JID_LEN]; + XmlNodeIq iq("get", SerialNext()); + iq << XATTR("from", m_ThreadInfo->fullJID); + iq << XATTR("to", from); + iq << XCHILDNS("pubsub", "http://jabber.org/protocol/pubsub") + << XCHILD("items") << XATTR("node", JABBER_FEAT_OMEMO ".devicelist"); + m_ThreadInfo->send(iq); + } if (!ListGetItemPtr(LIST_ROSTER, from)) { debugLogA("Receive presence online from %s (who is not in my roster)", from); ListAdd(LIST_ROSTER, from, hContact); -- cgit v1.2.3