summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/proto.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-02-21 20:52:04 +0000
committerRobert Pösel <robyer@seznam.cz>2014-02-21 20:52:04 +0000
commit04d80b0cc1a2fa993bfc8254fc65dd04a22cf6ac (patch)
tree7578e60333b69e1278400a43dd29893beb0742f4 /protocols/FacebookRM/src/proto.cpp
parentc1df68a227ef30f37411593fed2aee62e2d46f5e (diff)
Facebook: Mark messages as read when they are really read in Miranda (only for private conversations - group chats are still marked as read instantly)
git-svn-id: http://svn.miranda-ng.org/main/trunk@8209 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r--protocols/FacebookRM/src/proto.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp
index 520d13719a..10e61fc840 100644
--- a/protocols/FacebookRM/src/proto.cpp
+++ b/protocols/FacebookRM/src/proto.cpp
@@ -52,6 +52,7 @@ FacebookProto::FacebookProto(const char* proto_name,const TCHAR* username) :
HookProtoEvent(ME_TTB_MODULELOADED, &FacebookProto::OnToolbarInit);
HookProtoEvent(ME_GC_EVENT, &FacebookProto::OnGCEvent);
HookProtoEvent(ME_GC_BUILDMENU, &FacebookProto::OnGCMenuHook);
+ HookProtoEvent(ME_DB_EVENT_MARKED_READ, &FacebookProto::OnDbEventRead);
db_set_resident(m_szModuleName, "Status");
db_set_resident(m_szModuleName, "IdleTS");
@@ -474,6 +475,14 @@ INT_PTR FacebookProto::OnMind(WPARAM wParam, LPARAM lParam)
return 0;
}
+int FacebookProto::OnDbEventRead(WPARAM contactID, LPARAM dbei)
+{
+ if (!isOffline()) {
+ ForkThread(&FacebookProto::ReadMessageWorker, (void*)contactID);
+ }
+ return 0;
+}
+
INT_PTR FacebookProto::CheckNewsfeeds(WPARAM, LPARAM)
{
if (!isOffline()) {