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/process.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/process.cpp')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 80cd20e3d7..5428a4f5ec 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -795,8 +795,8 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message> &messages, boo // Set thread id (TID) for later setString(hChatContact, FACEBOOK_KEY_TID, fbc->thread_id.c_str()); - for (std::map<std::string, std::string>::iterator jt = fbc->participants.begin(); jt != fbc->participants.end(); ++jt) { - AddChatContact(fbc->thread_id.c_str(), jt->first.c_str(), jt->second.c_str()); + for (auto jt = fbc->participants.begin(); jt != fbc->participants.end(); ++jt) { + AddChatContact(fbc->thread_id.c_str(), jt->second); } } @@ -823,7 +823,7 @@ void FacebookProto::ReceiveMessages(std::vector<facebook_message> &messages, boo auto jt = fbc->participants.find(msg.user_id); if (jt != fbc->participants.end()) { - name = jt->second; + name = jt->second.nick; } // TODO: support also system messages (rename chat, user quit, etc.)! (here? or it is somewhere else? |