summaryrefslogtreecommitdiff
path: root/protocols/FacebookRM/src/messages.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/messages.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/messages.cpp')
-rw-r--r--protocols/FacebookRM/src/messages.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp
index 08b72eab59..269c0aeb91 100644
--- a/protocols/FacebookRM/src/messages.cpp
+++ b/protocols/FacebookRM/src/messages.cpp
@@ -88,7 +88,7 @@ void FacebookProto::SendChatMsgWorker(void *p)
std::string post_data = "threads[group_ids][0]=" + utils::url::encode(data->chat_id);
post_data += "&fb_dtsg=" + facy.dtsg_;
post_data += "&__user=" + facy.self_.user_id;
- post_data += "&phstamp=0";
+ post_data += "&phstamp=" + facy.phstamp(post_data);
http::response resp = facy.flap(REQUEST_THREAD_INFO, &post_data);
@@ -161,7 +161,8 @@ void FacebookProto::SendTypingWorker(void *p)
data += utils::url::encode(std::string(id));
data += "&fb_dtsg=" + facy.dtsg_;
- data += "&lsd=&phstamp=0&__user=" + facy.self_.user_id;
+ data += "&lsd=&__user=" + facy.self_.user_id;
+ data += "&phstamp=" + facy.phstamp(data);
http::response resp = facy.flap(REQUEST_TYPING_SEND, &data);
}
@@ -188,7 +189,7 @@ void FacebookProto::ReadMessageWorker(void *p)
std::string data = "ids[" + utils::url::encode(std::string(id)) + "]=true";
data += "&fb_dtsg=" + facy.dtsg_;
data += "&__user=" + facy.self_.user_id;
- data += "&__a=1&__dyn=&__req=&ttstamp=0";
+ data += "&__a=1&__dyn=&__req=&ttstamp=" + facy.ttstamp();
facy.flap(REQUEST_MARK_READ, &data);
}