From 26f28c7c13ef5ad4ef6986181f1ef4f46b85c627 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 4 Mar 2015 12:05:55 +0000 Subject: Facebook: Unify showing "seen info" for groupchats with classic contacts This also fixes not showing loaded "seen info" when opening groupchat message window again git-svn-id: http://svn.miranda-ng.org/main/trunk@12313 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/proto.cpp | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'protocols/FacebookRM/src/proto.cpp') diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index c8244b87e7..47b34e8b39 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -1109,7 +1109,19 @@ void FacebookProto::MessageRead(MCONTACT hContact) StatusTextData st = { 0 }; st.cbSize = sizeof(st); st.hIcon = Skin_GetIconByHandle(GetIconHandle("read")); - mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s"), ttime); + + if (isChatRoom(hContact)) { + // Get threadId to find chatroom in map + std::tstring tid = ptrT(getTStringA(hContact, FACEBOOK_KEY_TID)); + std::map::iterator it = facy.chat_rooms.find(tid); + + // Get readers from chatroom + TCHAR *treaders = (it != facy.chat_rooms.end() ? it->second->message_readers.c_str() : _T("???")); + + mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s by %s"), ttime, treaders); + } else { + mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s"), ttime); + } CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact, (LPARAM)&st); } -- cgit v1.2.3