diff options
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 2 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 9 | ||||
-rw-r--r-- | protocols/FacebookRM/src/proto.h | 1 |
3 files changed, 11 insertions, 1 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 83fd36df27..e7c6630642 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -24,7 +24,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. int FacebookProto::RecvMsg(MCONTACT hContact, PROTORECVEVENT *pre)
{
- ForkThread(&FacebookProto::ReadMessageWorker, (void*)hContact);
+ //ForkThread(&FacebookProto::ReadMessageWorker, (void*)hContact);
CallService(MS_PROTO_CONTACTISTYPING, hContact, (LPARAM)PROTOTYPE_CONTACTTYPING_OFF);
return Proto_RecvMessage(hContact, pre);
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()) {
diff --git a/protocols/FacebookRM/src/proto.h b/protocols/FacebookRM/src/proto.h index cf01d962d5..06aae5acb4 100644 --- a/protocols/FacebookRM/src/proto.h +++ b/protocols/FacebookRM/src/proto.h @@ -146,6 +146,7 @@ public: int __cdecl OnIdleChanged(WPARAM,LPARAM);
int __cdecl OnGCEvent(WPARAM,LPARAM);
int __cdecl OnGCMenuHook(WPARAM,LPARAM);
+ int __cdecl OnDbEventRead(WPARAM, LPARAM);
// Loops
bool NegotiateConnection();
|