diff options
author | Robert Pösel <robyer@seznam.cz> | 2015-04-29 19:34:50 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2015-04-29 19:34:50 +0000 |
commit | c305dc7c4cb20072a003c349b8eec9f0e835b3c9 (patch) | |
tree | 9ec2ddb108bea7b07c9ae8b1cde6dfc8d4de580a /protocols/FacebookRM/src/messages.cpp | |
parent | 36613a6ce15d9614e0883db8303dd2504c70ed4f (diff) |
Facebook: Some fixes for sending messages and fix crashes introduced in commit r13214; version bump
git-svn-id: http://svn.miranda-ng.org/main/trunk@13252 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 0fc60765cd..401c8d1c92 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -84,11 +84,11 @@ void FacebookProto::SendChatMsgWorker(void *p) if (hContact) { ptrA tid_(getStringA(hContact, FACEBOOK_KEY_TID)); std::string tid; - if (tid_ != NULL) { + if (tid_ != NULL && mir_strcmp(tid_, "null")) { tid = tid_; } else { - std::string post_data = "threads[group_ids][0]=" + utils::url::encode(data->chat_id); + std::string post_data = "threads[thread_ids][0]=" + utils::url::encode(data->chat_id); post_data += "&fb_dtsg=" + facy.dtsg_; post_data += "&__user=" + facy.self_.user_id; post_data += "&phstamp=" + facy.phstamp(post_data); @@ -96,7 +96,8 @@ void FacebookProto::SendChatMsgWorker(void *p) http::response resp = facy.flap(REQUEST_THREAD_INFO, &post_data); tid = utils::text::source_get_value(&resp.data, 2, "\"thread_id\":\"", "\""); - setString(hContact, FACEBOOK_KEY_TID, tid.c_str()); + if (!tid.empty() && tid.compare("null")) + setString(hContact, FACEBOOK_KEY_TID, tid.c_str()); debugLogA(" Got thread info: %s = %s", data->chat_id.c_str(), tid.c_str()); } |