diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-11-17 16:45:04 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-11-17 16:45:04 +0000 |
commit | 6029781c4a2ca30552d96de331a640c653d8bfba (patch) | |
tree | 77564aefd40bb512fe295266d526d45c9b4cc239 /protocols/FacebookRM/src/process.cpp | |
parent | 5507917da919d55aad972f8331a11da8f721f786 (diff) |
Facebook: Use correct phstamp and ttstamp values in POST data (Facebook doesn't give a .... anyway)
git-svn-id: http://svn.miranda-ng.org/main/trunk@11005 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/process.cpp')
-rw-r--r-- | protocols/FacebookRM/src/process.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/process.cpp b/protocols/FacebookRM/src/process.cpp index 4770f61323..39c9811c62 100644 --- a/protocols/FacebookRM/src/process.cpp +++ b/protocols/FacebookRM/src/process.cpp @@ -34,7 +34,7 @@ void FacebookProto::ProcessBuddyList(void*) facy.handle_entry("ProcessBuddyList"); // Prepare update data - std::string post_data = "user=" + facy.self_.user_id + "&fetch_mobile=true&phstamp=0&fb_dtsg=" + facy.dtsg_ + "&__user=" + facy.self_.user_id + "&cached_user_info_ids="; + std::string post_data = "user=" + facy.self_.user_id + "&fetch_mobile=true&fb_dtsg=" + facy.dtsg_ + "&__user=" + facy.self_.user_id + "&cached_user_info_ids="; int counter = 0; for (List::Item< facebook_user >* i = facy.buddies.begin(); i != NULL; i = i->next, counter++) @@ -42,6 +42,8 @@ void FacebookProto::ProcessBuddyList(void*) post_data += i->data->user_id + "%2C"; } + post_data += "&phstamp=" + facy.phstamp(post_data); + // Get buddy list http::response resp = facy.flap(REQUEST_BUDDY_LIST, &post_data); @@ -297,7 +299,7 @@ void FacebookProto::ProcessUnreadMessages(void*) data += "&client=mercury"; data += "__user=" + facy.self_.user_id; data += "&fb_dtsg=" + facy.dtsg_; - data += "&__a=1&__dyn=&__req=&ttstamp=0"; + data += "&__a=1&__dyn=&__req=&ttstamp=" + facy.ttstamp(); http::response resp = facy.flap(REQUEST_UNREAD_THREADS, &data); @@ -356,7 +358,7 @@ void FacebookProto::ProcessUnreadMessage(void *p) std::string data = "client=mercury"; data += "&__user=" + facy.self_.user_id; data += "&fb_dtsg=" + facy.dtsg_; - data += "&__a=1&__dyn=&__req=&ttstamp=0"; + data += "&__a=1&__dyn=&__req=&ttstamp=" + facy.ttstamp(); for (std::vector<std::string>::size_type i = 0; i < threads.size(); i++) { std::string thread_id = utils::url::encode(threads[i]); @@ -457,7 +459,7 @@ void FacebookProto::LoadLastMessages(void *p) std::string data = "client=mercury"; data += "&__user=" + facy.self_.user_id; data += "&fb_dtsg=" + facy.dtsg_; - data += "&__a=1&__dyn=&__req=&ttstamp=0"; + data += "&__a=1&__dyn=&__req=&ttstamp=" + facy.ttstamp(); bool isChat = isChatRoom(hContact); |