summaryrefslogtreecommitdiff
path: root/protocols/JabberG/src/jabber_menu.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-12-23 18:52:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-12-23 18:52:25 +0000
commit4b283b1cf3004aebbb1f4807456a2cd0fdb5f30c (patch)
tree00ee44be29c5ac306109eb2cd9d1fc7047644b3f /protocols/JabberG/src/jabber_menu.cpp
parentaf8c5b336e9609ed9c53b877dd7f57fb3d7194b9 (diff)
- XEP-0136 support (server-side message history);
- code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@2816 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_menu.cpp')
-rw-r--r--protocols/JabberG/src/jabber_menu.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp
index 95c0ee8b36..0ee785ef41 100644
--- a/protocols/JabberG/src/jabber_menu.cpp
+++ b/protocols/JabberG/src/jabber_menu.cpp
@@ -1085,6 +1085,10 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam)
if ( !hDialogsList)
hDialogsList = (HANDLE)CallService(MS_UTILS_ALLOCWINDOWLIST, 0, 0);
WindowList_Add(hDialogsList, event->hwndWindow, event->hContact);
+
+ JABBER_LIST_ITEM *pItem = GetItemFromContact(event->hContact);
+ if (pItem && (m_ThreadInfo->jabberServerCaps & JABBER_CAPS_ARCHIVE_AUTO) && m_options.EnableMsgArchive)
+ RetrieveMessageArchive(event->hContact, pItem);
}
else if (event->uType == MSG_WINDOW_EVT_CLOSING) {
if (hDialogsList)
@@ -1110,12 +1114,11 @@ int CJabberProto::OnProcessSrmmEvent(WPARAM, LPARAM lParam)
r->bMessageSessionActive = FALSE;
JabberCapsBits jcb = GetResourceCapabilites(jid, TRUE);
- if (jcb & JABBER_CAPS_CHATSTATES) {
- int iqId = SerialNext();
+ if (jcb & JABBER_CAPS_CHATSTATES)
m_ThreadInfo->send(
- XmlNode(_T("message")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("chat")) << XATTRID(iqId)
+ XmlNode(_T("message")) << XATTR(_T("to"), jid) << XATTR(_T("type"), _T("chat")) << XATTRID( SerialNext())
<< XCHILDNS(_T("gone"), _T(JABBER_FEAT_CHATSTATES)));
- } } } }
+ } } }
return 0;
}