summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/proto.cpp
diff options
context:
space:
mode:
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()) {