diff options
author | Robert Pösel <robyer@seznam.cz> | 2016-07-25 19:20:52 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2016-07-25 19:20:52 +0000 |
commit | f594c8c321533e59d66e7d47ab1a3cdbf551ad90 (patch) | |
tree | d0a74f6a0d87d192f21dd905941ade79a841c1bb /protocols/FacebookRM/src/communication.cpp | |
parent | 0a110324bc5c7316fc52d9d86137d40759508794 (diff) |
Facebook: Improve loading users in chatrooms
Fix loading all names (previously it won't loaded name of last user), load also former participants, code refactoring
git-svn-id: http://svn.miranda-ng.org/main/trunk@17129 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index 21ff44d15d..486bc08696 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -714,18 +714,12 @@ void facebook_client::insert_reader(MCONTACT hContact, time_t timestamp, const s auto itRoom = chat_rooms.find(tid); if (itRoom != chat_rooms.end()) { facebook_chatroom *chatroom = itRoom->second; - std::map<std::string, std::string> participants = chatroom->participants; + std::map<std::string, chatroom_participant> participants = chatroom->participants; // try to get name of this participant auto participant = participants.find(readerId); if (participant != participants.end()) { - name = participant->second; - } - else { - // FIXME: This probably shouldn't be here, but chatroom should have all it's participants loaded itself already - // add this missing participant, just in case - participants.insert(std::make_pair(readerId, name)); - parent->AddChatContact(tid.c_str(), readerId.c_str(), name.c_str()); + name = participant->second.nick; } } |