summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_iqid.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-06-11 22:20:11 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-06-11 22:20:18 +0300
commit5fb805622a3a3368ffb3de0c649074376e70256a (patch)
tree64f0149c8e5d692cf19e5fcebb60b0fba59e3d93 /protocols/JabberG/src/jabber_iqid.cpp
parente6bf9c2a41622424c2cd4006326455e08c80812a (diff)
fixes #1149 (XMPP/Jabber: Implement XEP-0313 ( mam / Message Archive Management )
Diffstat (limited to 'protocols/JabberG/src/jabber_iqid.cpp')
-rwxr-xr-xprotocols/JabberG/src/jabber_iqid.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/protocols/JabberG/src/jabber_iqid.cpp b/protocols/JabberG/src/jabber_iqid.cpp
index e342f39410..bdaa73dc5d 100755
--- a/protocols/JabberG/src/jabber_iqid.cpp
+++ b/protocols/JabberG/src/jabber_iqid.cpp
@@ -123,10 +123,14 @@ void CJabberProto::OnProcessLoginRq(ThreadData *info, DWORD rq)
DWORD dwMask = JABBER_LOGIN_ROSTER | JABBER_LOGIN_BOOKMARKS | JABBER_LOGIN_SERVERINFO;
if ((info->dwLoginRqs & dwMask) == dwMask && !(info->dwLoginRqs & JABBER_LOGIN_BOOKMARKS_AJ)) {
- if (info->jabberServerCaps & JABBER_CAPS_CARBONS) {
- // Server seems to support carbon copies, let's enable/disable them
+
+ // Server seems to support carbon copies, let's enable/disable them
+ if (info->jabberServerCaps & JABBER_CAPS_CARBONS)
m_ThreadInfo->send(XmlNodeIq("set", SerialNext()) << XCHILDNS((m_bEnableCarbons) ? "enable" : "disable", JABBER_FEAT_CARBONS));
- }
+
+ // Server seems to support MAM, let's retrieve MAM settings
+ if (info->jabberServerCaps & JABBER_CAPS_MAM)
+ m_ThreadInfo->send(XmlNodeIq(AddIQ(&CJabberProto::OnIqResultMamInfo, JABBER_IQ_TYPE_GET, 0, this)) << XCHILDNS("prefs", JABBER_FEAT_MAM));
if (m_bAutoJoinBookmarks) {
LIST<JABBER_LIST_ITEM> ll(10);