diff options
author | Robert Pösel <robyer@seznam.cz> | 2016-08-17 12:53:03 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2016-08-17 12:53:03 +0000 |
commit | d1ff6d1f09cc8f24993060d03e9e20cc855c2bb7 (patch) | |
tree | 435a273aa7abe1039eff8e1dc55c05c1d424fafc /protocols/FacebookRM/src/contacts.cpp | |
parent | 0bb9ef2de2e7cf475ef1e4be81e9480dd3fc95d7 (diff) |
Facebook: Fix sending messages and other changed requests
git-svn-id: http://svn.miranda-ng.org/main/trunk@17189 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/contacts.cpp')
-rw-r--r-- | protocols/FacebookRM/src/contacts.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp index 8893287514..1d780d6e72 100644 --- a/protocols/FacebookRM/src/contacts.cpp +++ b/protocols/FacebookRM/src/contacts.cpp @@ -191,11 +191,12 @@ std::string FacebookProto::ThreadIDToContactID(const std::string &thread_id) data += "&fb_dtsg=" + facy.dtsg_; data += "&ttstamp=" + facy.ttstamp_; data += "&__rev=" + facy.__rev(); + data += "&__pc=PHASED:DEFAULT&__be=-1&__a=1"; data += "&threads[thread_ids][0]=" + utils::url::encode(thread_id); std::string user_id; - http::response resp = facy.flap(REQUEST_THREAD_INFO, &data); // NOTE: Request revised 1.9.2015 + http::response resp = facy.flap(REQUEST_THREAD_INFO, &data); // NOTE: Request revised 17.8.2016 if (resp.code == HTTP_CODE_OK) { CODE_BLOCK_TRY @@ -233,8 +234,9 @@ void FacebookProto::LoadContactInfo(facebook_user* fbu) data += "&fb_dtsg=" + facy.dtsg_; data += "&ttstamp=" + facy.ttstamp_; data += "&__rev=" + facy.__rev(); + data += "&__pc=PHASED:DEFAULT&__be=-1&__a=1"; - http::response resp = facy.flap(REQUEST_USER_INFO, &data); // NOTE: Request revised 11.2.2016 + http::response resp = facy.flap(REQUEST_USER_INFO, &data); // NOTE: Request revised 17.8.2016 if (resp.code == HTTP_CODE_OK) { CODE_BLOCK_TRY @@ -304,6 +306,7 @@ void FacebookProto::LoadParticipantsNames(facebook_chatroom *fbc) data += "&fb_dtsg=" + facy.dtsg_; data += "&ttstamp=" + facy.ttstamp_; data += "&__rev=" + facy.__rev(); + data += "&__pc=PHASED:DEFAULT&__be=-1&__a=1"; for (std::string::size_type i = 0; i < namelessIds.size(); i++) { std::string pos = utils::conversion::to_string(&i, UTILS_CONV_UNSIGNED_NUMBER); @@ -311,7 +314,7 @@ void FacebookProto::LoadParticipantsNames(facebook_chatroom *fbc) data += "&ids[" + pos + "]=" + id; } - http::response resp = facy.flap(REQUEST_USER_INFO, &data); // NOTE: Request revised 11.2.2016 + http::response resp = facy.flap(REQUEST_USER_INFO, &data); // NOTE: Request revised 17.8.2016 if (resp.code == HTTP_CODE_OK) { CODE_BLOCK_TRY @@ -359,18 +362,19 @@ void FacebookProto::LoadChatInfo(facebook_chatroom *fbc) data += "&fb_dtsg=" + facy.dtsg_; data += "&ttstamp=" + facy.ttstamp_; data += "&__rev=" + facy.__rev(); + data += "&__pc=PHASED:DEFAULT&__be=-1&__a=1"; std::string thread_id = utils::url::encode(fbc->thread_id); // request info about thread data += "&threads[thread_ids][0]=" + thread_id; - // TODO: ABILITY TO DEFINE TIMESTAMP! (way to load history since specific moment? ... offset seems to does nothing at all) + // TODO: ABILITY TO DEFINE TIMESTAMP! (way to load history since specific moment? probably as replacement for removed sync_threads request?) /* messages[user_ids][<<userid>>][offset]=11 messages[user_ids][<<userid>>][timestamp]=1446369866009 // most recent message has this timestamp (included) messages[user_ids][<<userid>>][limit]=20 */ - http::response resp = facy.flap(REQUEST_THREAD_INFO, &data); // NOTE: Request revised 12.2.2016 + http::response resp = facy.flap(REQUEST_THREAD_INFO, &data); // NOTE: Request revised 17.8.2016 if (resp.code != HTTP_CODE_OK) { facy.handle_error("LoadChatInfo"); |