From f594c8c321533e59d66e7d47ab1a3cdbf551ad90 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 25 Jul 2016 19:20:52 +0000 Subject: 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 --- protocols/FacebookRM/src/process.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'protocols/FacebookRM/src/process.cpp') 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 &messages, boo // Set thread id (TID) for later setString(hChatContact, FACEBOOK_KEY_TID, fbc->thread_id.c_str()); - for (std::map::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 &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? -- cgit v1.2.3