From 8a904bdef0e8237dee49c1b704d4ebbc2b28a958 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 31 Aug 2016 10:11:32 +0000 Subject: Facebook: Basic support for handling more chat events; version bump Events like user join/leave, change emoji, etc. are now printed, but that's all. Still missing specific behavior for them, but that require more changes in events parsing and on other places. git-svn-id: http://svn.miranda-ng.org/main/trunk@17222 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/chat.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/FacebookRM/src/chat.cpp') diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 9720dc06b3..78df418b38 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -163,7 +163,7 @@ int FacebookProto::OnGCEvent(WPARAM, LPARAM lParam) return 0; } -void FacebookProto::AddChatContact(const char *chat_id, const chatroom_participant &user) +void FacebookProto::AddChatContact(const char *chat_id, const chatroom_participant &user, bool addToLog) { // Don't add user if it's already there if (IsChatContact(chat_id, user.user_id.c_str())) @@ -176,7 +176,7 @@ void FacebookProto::AddChatContact(const char *chat_id, const chatroom_participa GCDEST gcd = { m_szModuleName, tchat_id, GC_EVENT_JOIN }; GCEVENT gce = { sizeof(gce), &gcd }; gce.pDest = &gcd; - gce.dwFlags = GCEF_ADDTOLOG; + gce.dwFlags = addToLog ? GCEF_ADDTOLOG : 0; gce.ptszNick = tnick; gce.ptszUID = tid; gce.time = ::time(NULL); @@ -325,7 +325,7 @@ INT_PTR FacebookProto::OnJoinChat(WPARAM hContact, LPARAM) // Add chat contacts for (std::map::iterator jt = fbc->participants.begin(); jt != fbc->participants.end(); ++jt) { - AddChatContact(fbc->thread_id.c_str(), jt->second); + AddChatContact(fbc->thread_id.c_str(), jt->second, false); } // Load last messages -- cgit v1.2.3