diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-03-04 12:05:59 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-03-04 12:05:59 +0000 |
commit | 921df52650b4d5bc6b725f28bbc0b3dd298d1989 (patch) | |
tree | 64ef035901d0568284324ca1bcb690cacee853e3 /protocols/FacebookRM/src/proto.cpp | |
parent | cdc3ce491f2ec062b717646f115d856775cbca9a (diff) |
Facebook: More unification for groupchat seen info and save groupchat "readers" into database in key "MessageReaders" (Unicode); Version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@12315 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/proto.cpp')
-rw-r--r-- | protocols/FacebookRM/src/proto.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/protocols/FacebookRM/src/proto.cpp b/protocols/FacebookRM/src/proto.cpp index 47b34e8b39..f3d5cdc222 100644 --- a/protocols/FacebookRM/src/proto.cpp +++ b/protocols/FacebookRM/src/proto.cpp @@ -82,6 +82,7 @@ FacebookProto::FacebookProto(const char* proto_name, const TCHAR* username) : db_set_resident(m_szModuleName, "Status"); db_set_resident(m_szModuleName, "IdleTS"); db_set_resident(m_szModuleName, FACEBOOK_KEY_MESSAGE_READ); + db_set_resident(m_szModuleName, FACEBOOK_KEY_MESSAGE_READERS); InitHotkeys(); InitPopups(); @@ -1111,14 +1112,9 @@ void FacebookProto::MessageRead(MCONTACT hContact) st.hIcon = Skin_GetIconByHandle(GetIconHandle("read")); if (isChatRoom(hContact)) { - // Get threadId to find chatroom in map - std::tstring tid = ptrT(getTStringA(hContact, FACEBOOK_KEY_TID)); - std::map<std::tstring, facebook_chatroom*>::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); + // Load readers names + ptrT treaders(getTStringA(hContact, FACEBOOK_KEY_MESSAGE_READERS)); + mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s by %s"), ttime, treaders ? treaders : _T("???")); } else { mir_sntprintf(st.tszText, SIZEOF(st.tszText), TranslateT("Message read: %s"), ttime); } |