summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/chat.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2016-08-31 10:11:32 +0000
committerRobert Pösel <robyer@seznam.cz>2016-08-31 10:11:32 +0000
commit8a904bdef0e8237dee49c1b704d4ebbc2b28a958 (patch)
treec07494e752a8a00c237afdbcc25162391d66957c /protocols/FacebookRM/src/chat.cpp
parentfc8bb06ec24197d50e695e5de657e7904d6ce597 (diff)
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
Diffstat (limited to 'protocols/FacebookRM/src/chat.cpp')
-rw-r--r--protocols/FacebookRM/src/chat.cpp6
1 files changed, 3 insertions, 3 deletions
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<std::string, chatroom_participant>::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