diff options
author | Robert Pösel <robyer@seznam.cz> | 2016-04-17 17:06:12 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2016-04-17 17:06:12 +0000 |
commit | 9e64b26c646913d5669723269c07e6fe8277f10c (patch) | |
tree | 0702a4bf6254e49b0cf5af82f3b2d71c56721d30 /protocols/FacebookRM/src/process.cpp | |
parent | 34dd9e912952befefa30ba0d64dbd18d84201552 (diff) |
Facebook: Loading names of all users in multi chat from server (not only existing Miranda contacts)
It primary iterates over Miranda's contacts list to find existing contacts (e.g. to preserve existing custom names of these contacts). Then for missing ones it does request to server to get their names.
git-svn-id: http://svn.miranda-ng.org/main/trunk@16701 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/process.cpp')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index c1986f2b7d..27383e09f1 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -866,9 +866,9 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> messages, boo debugLogA(" < Got chat message ID: %s", messages[i]->message_id.c_str()); facebook_chatroom *fbc; - std::string tthread_id = messages[i]->thread_id.c_str(); + std::string thread_id = messages[i]->thread_id.c_str(); - auto it = facy.chat_rooms.find(tthread_id); + auto it = facy.chat_rooms.find(thread_id); if (it != facy.chat_rooms.end()) { fbc = it->second; } @@ -880,14 +880,14 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message*> messages, boo } // We don't have this chat loaded in memory yet, lets load some info (name, list of users) - fbc = new facebook_chatroom(tthread_id); + fbc = new facebook_chatroom(thread_id); LoadChatInfo(fbc); - facy.chat_rooms.insert(std::make_pair(tthread_id, fbc)); + facy.chat_rooms.insert(std::make_pair(thread_id, fbc)); } MCONTACT hChatContact = NULL; // RM TODO: better use check if chatroom exists/is in db/is online... no? - // like: if (ChatIDToHContact(tthread_id) == NULL) { + // like: if (ChatIDToHContact(thread_id) == NULL) { ptrA users(GetChatUsers(fbc->thread_id.c_str())); if (users == NULL) { AddChat(fbc->thread_id.c_str(), fbc->chat_name.c_str()); |