diff options
Diffstat (limited to 'protocols/JabberG/src/jabber_events.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_events.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/protocols/JabberG/src/jabber_events.cpp b/protocols/JabberG/src/jabber_events.cpp index ea5db1e5cb..e6592e1705 100644 --- a/protocols/JabberG/src/jabber_events.cpp +++ b/protocols/JabberG/src/jabber_events.cpp @@ -154,6 +154,28 @@ void __cdecl CJabberProto::OnAddContactForever(MCONTACT hContact) Contact_Hide(hContact, false);
}
+int __cdecl CJabberProto::OnDbMarkedRead(WPARAM, LPARAM hDbEvent)
+{
+ MCONTACT hContact = db_event_getContact(hDbEvent);
+ if (!hContact)
+ return 0;
+
+ // filter out only events of my protocol
+ const char *szProto = Proto_GetBaseAccountName(hContact);
+ if (mir_strcmp(szProto, m_szModuleName))
+ return 0;
+
+ auto *pMark = m_arChatMarks.find((CChatMark *)&hDbEvent);
+ if (pMark) {
+ XmlNode reply("message"); reply << XATTR("to", pMark->szFrom) << XATTR("id", pMark->szId)
+ << XCHILDNS("displayed", JABBER_FEAT_CHAT_MARKERS) << XATTR("id", pMark->szId);
+ m_ThreadInfo->send(reply);
+
+ m_arChatMarks.remove(pMark);
+ }
+ return 0;
+}
+
int __cdecl CJabberProto::OnDbSettingChanged(WPARAM hContact, LPARAM lParam)
{
if (hContact == 0 || !m_bJabberOnline)
|