From 8721208a636712a2c014917d460ee2748225583b Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Wed, 4 Apr 2018 23:33:55 +0300 Subject: protocols: jabber: xep-0198 - do not request roster on resumed session --- protocols/JabberG/src/jabber_iqid.cpp | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) (limited to 'protocols/JabberG/src/jabber_iqid.cpp') diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp index c2d2d1313e..e98ae24c1e 100755 --- a/protocols/JabberG/src/jabber_iqid.cpp +++ b/protocols/JabberG/src/jabber_iqid.cpp @@ -179,24 +179,27 @@ void CJabberProto::OnLoggedIn() m_ThreadInfo->dwLoginRqs = 0; // XEP-0083 support + if (!(m_StrmMgmt.IsSessionResumed())) { - CJabberIqInfo *pIqInfo = AddIQ(&CJabberProto::OnIqResultNestedRosterGroups, JABBER_IQ_TYPE_GET); - // ugly hack to prevent hangup during login process - pIqInfo->SetTimeout(30000); - m_ThreadInfo->send( - XmlNodeIq(pIqInfo) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) + { + CJabberIqInfo *pIqInfo = AddIQ(&CJabberProto::OnIqResultNestedRosterGroups, JABBER_IQ_TYPE_GET); + // ugly hack to prevent hangup during login process + pIqInfo->SetTimeout(30000); + m_ThreadInfo->send( + XmlNodeIq(pIqInfo) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(L"roster", JABBER_FEAT_NESTED_ROSTER_GROUPS)); - } + } - // Server-side notes - m_ThreadInfo->send( - XmlNodeIq(AddIQ(&CJabberProto::OnIqResultNotes, JABBER_IQ_TYPE_GET)) + // Server-side notes + m_ThreadInfo->send( + XmlNodeIq(AddIQ(&CJabberProto::OnIqResultNotes, JABBER_IQ_TYPE_GET)) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(L"storage", JABBER_FEAT_MIRANDA_NOTES)); - - m_ThreadInfo->send( - XmlNodeIq(AddIQ(&CJabberProto::OnIqResultDiscoBookmarks, JABBER_IQ_TYPE_GET)) + + m_ThreadInfo->send( + XmlNodeIq(AddIQ(&CJabberProto::OnIqResultDiscoBookmarks, JABBER_IQ_TYPE_GET)) << XQUERY(JABBER_FEAT_PRIVATE_STORAGE) << XCHILDNS(L"storage", L"storage:bookmarks")); + } m_bPepSupported = false; m_ThreadInfo->jabberServerCaps = JABBER_RESOURCE_CAPS_NONE; -- cgit v1.2.3