diff options
author | Robert Pösel <robyer@seznam.cz> | 2013-05-17 19:26:34 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2013-05-17 19:26:34 +0000 |
commit | 1596f83daf39b7b33ef342d819b02111a175447d (patch) | |
tree | ea22adeb184b2ecad82373e144475d950095415f /protocols/FacebookRM | |
parent | 1d9fd398b75a5a6eca9d40db2e2abb60c96ebc7d (diff) |
Facebook: Ooooops. Fixed marking messages as read.
git-svn-id: http://svn.miranda-ng.org/main/trunk@4711 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM')
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index e7d2c7c081..58dcc8275f 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -168,23 +168,21 @@ void FacebookProto::ReadMessageWorker(void *p) if (p == NULL)
return;
- return;
-
HANDLE hContact = static_cast<HANDLE>(p);
- // first mark message read
- ptrA id( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID));
- if (id == NULL) return;
+ if (!db_get_b(NULL, m_szModuleName, FACEBOOK_KEY_MARK_READ, 1)) {
+ // old variant - no seen info updated
+ ptrA id( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_ID));
+ if (id == NULL) return;
- std::string data = "action=chatMarkRead";
- data += "&other_user=" + std::string(id);
- data += "&fb_dtsg=" + (facy.dtsg_.length() ? facy.dtsg_ : "0");
- data += "&lsd=&__user=" + facy.self_.user_id;
+ std::string data = "action=chatMarkRead";
+ data += "&other_user=" + std::string(id);
+ data += "&fb_dtsg=" + (facy.dtsg_.length() ? facy.dtsg_ : "0");
+ data += "&lsd=&__user=" + facy.self_.user_id;
- facy.flap(FACEBOOK_REQUEST_ASYNC, &data);
-
- // then send seen info, if enabled
- if (db_get_b(NULL, m_szModuleName, FACEBOOK_KEY_MARK_READ, 1)) {
+ facy.flap(FACEBOOK_REQUEST_ASYNC, &data);
+ } else {
+ // new variant - with seen info
ptrA mid( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_MESSAGE_ID));
if (mid == NULL) return;
|