diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-05 10:17:07 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2015-09-05 10:17:07 +0000 |
commit | 3e66e9b159ce9ef494bd2caedf36481a952acd4a (patch) | |
tree | 5d5992e43017839c4da57d38a41b2e806799546e /protocols/FacebookRM/src/communication.cpp | |
parent | b754e2e21ea8c3d122ba35d8a0eeba18e94e9e7f (diff) |
Facebook: new MessageState api
git-svn-id: http://svn.miranda-ng.org/main/trunk@15251 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/communication.cpp')
-rw-r--r-- | protocols/FacebookRM/src/communication.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/FacebookRM/src/communication.cpp b/protocols/FacebookRM/src/communication.cpp index d6ffff32bb..b9d7a9d980 100644 --- a/protocols/FacebookRM/src/communication.cpp +++ b/protocols/FacebookRM/src/communication.cpp @@ -682,6 +682,11 @@ void facebook_client::insert_reader(MCONTACT hContact, time_t timestamp, const s parent->setDword(hContact, FACEBOOK_KEY_MESSAGE_READ, timestamp); readers.insert(std::make_pair(hContact, timestamp)); parent->MessageRead(hContact); + if (ServiceExists(MS_MESSAGESTATE_UPDATE)) + { + MessageReadData data(timestamp, MRD_TYPE_READTIME); + CallService(MS_MESSAGESTATE_UPDATE, hContact, (LPARAM)&data); + } } /** @@ -692,8 +697,8 @@ void facebook_client::erase_reader(MCONTACT hContact) if (parent->isChatRoom(hContact)) { parent->delSetting(hContact, FACEBOOK_KEY_MESSAGE_READERS); } - if (!ServiceExists("MessageState/DummyService")) - parent->delSetting(hContact, FACEBOOK_KEY_MESSAGE_READ); + + parent->delSetting(hContact, FACEBOOK_KEY_MESSAGE_READ); readers.erase(hContact); CallService(MS_MSG_SETSTATUSTEXT, (WPARAM)hContact); |