diff options
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 5957cf4ba7..794225de2a 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -343,3 +343,35 @@ HttpRequest* facebook_client::markMessageReadRequest(const LIST<char> &ids) return p; } + +///////////////////////////////////////////////////////////////////////////////////////// + +HttpRequest* facebook_client::exitThreadRequest(facebook_chatroom *fbc) +{ + HttpRequest *p = new HttpRequest(REQUEST_POST, FACEBOOK_SERVER_REGULAR "/messaging/send/"); + + p->Url << INT_PARAM("dpr", 1); + + std::string msgid = utils::text::rand_string(15); + + p->Body + << CHAR_PARAM("client", "mercury") + << CHAR_PARAM("action_type", "ma-type:log-message") + << CHAR_PARAM("log_message_data[removed_participants][0]", ("fbid:" + self_.user_id).c_str()) + << CHAR_PARAM("log_message_type", "log:unsubscribe") + << CHAR_PARAM("message_id", msgid.c_str()) + << CHAR_PARAM("offline_threading_id", msgid.c_str()) + << CHAR_PARAM("source", "source:chat:web") + << CHAR_PARAM("thread_fbid", fbc->thread_id.substr(3).c_str()) + << CHAR_PARAM("fb_dtsg", dtsg_.c_str()) + << INT64_PARAM("timestamp", ::time(nullptr) * 1000) + << CHAR_PARAM("__user", self_.user_id.c_str()) + << CHAR_PARAM("__dyn", __dyn()) + << CHAR_PARAM("__req", __req()) + << CHAR_PARAM("__rev", __rev()) + << CHAR_PARAM("__pc", "PHASED:DEFAULT") + << INT_PARAM("__a", 1) + << INT_PARAM("__be", 1); + + return p; +} |