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/chat.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/chat.cpp')
-rw-r--r-- | protocols/FacebookRM/src/chat.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/protocols/FacebookRM/src/chat.cpp b/protocols/FacebookRM/src/chat.cpp index 4fe98713f4..bcdad74310 100644 --- a/protocols/FacebookRM/src/chat.cpp +++ b/protocols/FacebookRM/src/chat.cpp @@ -288,22 +288,22 @@ INT_PTR FacebookProto::OnJoinChat(WPARAM hContact, LPARAM) return 0; facebook_chatroom *fbc; - std::string tthread_id = threadId; + std::string thread_id = threadId; - 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; } else { // 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)); } // RM TODO: better use check if chatroom exists/is in db/is online... no? - // like: if (ChatIDToHContact(tthread_id) == NULL) { - ptrA users(GetChatUsers(tthread_id.c_str())); + // like: if (ChatIDToHContact(thread_id) == NULL) { + ptrA users(GetChatUsers(thread_id.c_str())); if (users == NULL) { // Add chatroom AddChat(fbc->thread_id.c_str(), fbc->chat_name.c_str()); |