summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xprotocols/JabberG/src/jabber_iqid.cpp9
-rwxr-xr-xprotocols/JabberG/src/jabber_proto.h1
-rwxr-xr-xprotocols/JabberG/src/jabber_thread.cpp4
3 files changed, 14 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index d46980ca7e..a0c0d8bdfd 100755
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -1069,6 +1069,15 @@ void CJabberProto::OnIqResultSetVcard(const TiXmlElement *iqNode, CJabberIqInfo*
SendPresence(m_iStatus, false);
}
}
+void CJabberProto::OnIqResultGetOmemodevicelist(const TiXmlElement* iqNode, CJabberIqInfo* pInfo)
+{
+ auto* itemsNode = XmlGetChildByTag(iqNode, "items", "node", JABBER_FEAT_OMEMO ".devicelist");
+ auto from = XmlGetAttr(iqNode, "from");
+ if (itemsNode) {
+ OmemoHandleDeviceList(from, itemsNode);
+ return;
+ }
+}
void CJabberProto::OnIqResultSetSearch(const TiXmlElement *iqNode, CJabberIqInfo*)
{
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h
index 6b3047b2cb..6d7cd09086 100755
--- a/protocols/JabberG/src/jabber_proto.h
+++ b/protocols/JabberG/src/jabber_proto.h
@@ -566,6 +566,7 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface
void OnIqResultSetPassword(const TiXmlElement *iqNode, CJabberIqInfo *pInfo);
void OnIqResultSetSearch(const TiXmlElement *iqNode, CJabberIqInfo *pInfo);
void OnIqResultSetVcard(const TiXmlElement *iqNode, CJabberIqInfo *pInfo);
+ void OnIqResultGetOmemodevicelist(const TiXmlElement* iqNode, CJabberIqInfo* pInfo);
void OnProcessLoginRq(ThreadData *info, uint32_t rq);
void OnLoggedIn(void);
diff --git a/protocols/JabberG/src/jabber_thread.cpp b/protocols/JabberG/src/jabber_thread.cpp
index 7aa94ca70c..8a9d408fc6 100755
--- a/protocols/JabberG/src/jabber_thread.cpp
+++ b/protocols/JabberG/src/jabber_thread.cpp
@@ -1578,6 +1578,10 @@ void CJabberProto::OnProcessPresence(const TiXmlElement *node, ThreadData *info)
iq << XATTR("to", from);
iq << XCHILDNS("pubsub", "http://jabber.org/protocol/pubsub")
<< XCHILD("items") << XATTR("node", JABBER_FEAT_OMEMO ".devicelist");
+ m_ThreadInfo->send(
+ XmlNodeIq(AddIQ(&CJabberProto::OnIqResultGetRoster, JABBER_IQ_TYPE_GET))
+ << XCHILDNS("query", JABBER_FEAT_IQ_ROSTER));
+
m_ThreadInfo->send(iq);
}
if (!ListGetItemPtr(LIST_ROSTER, from)) {