summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/contacts.cpp
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2014-11-17 16:45:04 +0000
committerRobert Pösel <robyer@seznam.cz>2014-11-17 16:45:04 +0000
commit6029781c4a2ca30552d96de331a640c653d8bfba (patch)
tree77564aefd40bb512fe295266d526d45c9b4cc239 /protocols/FacebookRM/src/contacts.cpp
parent5507917da919d55aad972f8331a11da8f721f786 (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/contacts.cpp')
-rw-r--r--protocols/FacebookRM/src/contacts.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/contacts.cpp b/protocols/FacebookRM/src/contacts.cpp
index 2e99856a7f..7e76fdb4b7 100644
--- a/protocols/FacebookRM/src/contacts.cpp
+++ b/protocols/FacebookRM/src/contacts.cpp
@@ -161,7 +161,7 @@ std::string FacebookProto::ThreadIDToContactID(std::string thread_id)
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();
data += "&threads[thread_ids][0]=" + utils::url::encode(thread_id);
std::string user_id = "";
@@ -252,7 +252,7 @@ void FacebookProto::LoadChatInfo(facebook_chatroom *fbc)
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();
std::string thread_id = utils::url::encode(std::string(_T2A(fbc->thread_id.c_str())));
@@ -403,10 +403,11 @@ void FacebookProto::DeleteContactFromServer(void *data)
std::string id = (*(std::string*)data);
delete data;
- std::string query = "norefresh=true&unref=button_dropdown&confirmed=1&phstamp=0&__a=1";
+ std::string query = "norefresh=true&unref=button_dropdown&confirmed=1&__a=1";
query += "&fb_dtsg=" + facy.dtsg_;
query += "&uid=" + id;
query += "&__user=" + facy.self_.user_id;
+ query += "&phstamp=" + facy.phstamp(query);
std::string get_query = "norefresh=true&unref=button_dropdown&uid=" + id;
@@ -610,9 +611,10 @@ void FacebookProto::SendPokeWorker(void *p)
delete p;
std::string data = "poke_target=" + id;
- data += "&do_confirm=0&phstamp=0";
+ data += "&do_confirm=0";
data += "&fb_dtsg=" + facy.dtsg_;
data += "&__user=" + facy.self_.user_id;
+ data += "&phstamp=" + facy.phstamp(data);
// Send poke
http::response resp = facy.flap(REQUEST_POKE, &data);