From 9e64b26c646913d5669723269c07e6fe8277f10c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Sun, 17 Apr 2016 17:06:12 +0000 Subject: 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 --- protocols/FacebookRM/src/process.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'protocols/FacebookRM/src/process.cpp') 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 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 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()); -- cgit v1.2.3