summaryrefslogtreecommitdiff
path: root/protocols/SkypeWeb/src/skype_messages.cpp
diff options
context:
space:
mode:
authorMikalaiR <nikolay.romanovich@narod.ru>2015-04-14 13:33:53 +0000
committerMikalaiR <nikolay.romanovich@narod.ru>2015-04-14 13:33:53 +0000
commitc0af4589fb0d1cb2a365a5ebe01c1a1ee4bfee7a (patch)
tree0f5ec14c913ae4053311d2d375e774619bcdcf8f /protocols/SkypeWeb/src/skype_messages.cpp
parentae14345bbfce23728baefb9db26ff8e73ea13ad7 (diff)
SkypeWeb: Marking message as read.
git-svn-id: http://svn.miranda-ng.org/main/trunk@12806 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/SkypeWeb/src/skype_messages.cpp')
-rw-r--r--protocols/SkypeWeb/src/skype_messages.cpp13
1 files changed, 12 insertions, 1 deletions
diff --git a/protocols/SkypeWeb/src/skype_messages.cpp b/protocols/SkypeWeb/src/skype_messages.cpp
index 070cf94851..a826d38e52 100644
--- a/protocols/SkypeWeb/src/skype_messages.cpp
+++ b/protocols/SkypeWeb/src/skype_messages.cpp
@@ -243,8 +243,19 @@ void CSkypeProto::OnPrivateMessageEvent(JSONNODE *node)
}
}
-int CSkypeProto::OnDbEventRead(WPARAM wParam, LPARAM lParam)
+int CSkypeProto::OnDbEventRead(WPARAM, LPARAM hDbEvent)
{
debugLogA(__FUNCTION__);
+ if (IsOnline())
+ MarkMessagesRead(hDbEvent);
return 0;
+}
+
+void CSkypeProto::MarkMessagesRead(MEVENT hDbEvent)
+{
+ debugLogA(__FUNCTION__);
+ DBEVENTINFO dbei = { sizeof(dbei) };
+ db_event_get(hDbEvent, &dbei);
+ time_t timestamp = dbei.timestamp;
+ PushRequest(new MarkMessageReadRequest(ptrA(getStringA("registrationToken")), timestamp, ptrA(getStringA("Server"))));
} \ No newline at end of file