summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/messages.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-05-17 18:00:05 +0000
committerRobert Pösel <robyer@seznam.cz>2013-05-17 18:00:05 +0000
commit0d8ae90913bd0b53c6af709928e7f5e5a3fc9b50 (patch)
tree85aaf04425373593c56bb413a158f9102d5ec3ad /protocols/FacebookRM/src/messages.cpp
parent1c917ac3f485ffac7b4316d633a344fbafcedb78 (diff)
Facebook: Added few options items - use local time, send seen when marking read, select server to open urls.
git-svn-id: http://svn.miranda-ng.org/main/trunk@4703 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r--protocols/FacebookRM/src/messages.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index bb3808c225..e7d2c7c081 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -172,19 +172,19 @@ void FacebookProto::ReadMessageWorker(void *p)
HANDLE hContact = static_cast<HANDLE>(p);
- if (!db_get_b(NULL, m_szModuleName, FACEBOOK_KEY_MARK_READ, 0)) {
- // 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;
+ // first mark message read
+ 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;
- http::response resp = facy.flap(FACEBOOK_REQUEST_ASYNC, &data);
- } else {
- // new variant - with seen info
+ facy.flap(FACEBOOK_REQUEST_ASYNC, &data);
+
+ // then send seen info, if enabled
+ if (db_get_b(NULL, m_szModuleName, FACEBOOK_KEY_MARK_READ, 1)) {
ptrA mid( db_get_sa(hContact, m_szModuleName, FACEBOOK_KEY_MESSAGE_ID));
if (mid == NULL) return;
@@ -193,7 +193,7 @@ void FacebookProto::ReadMessageWorker(void *p)
data += "&__user=" + facy.self_.user_id;
data += "&__a=1&__dyn=&__req=j&phstamp=0";
- http::response resp = facy.flap(FACEBOOK_REQUEST_MARK_READ, &data);
+ facy.flap(FACEBOOK_REQUEST_MARK_READ, &data);
}
}