diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-08-24 15:46:24 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-08-24 15:46:24 +0000 |
commit | 9afd590f4fd860d3d023203137129c8870bb8579 (patch) | |
tree | a8cb541e41f5b72bfde3309e0a9f46794151a104 /protocols/FacebookRM/src/messages.cpp | |
parent | aa28fe4f758a20680b63d0bda40207548ab93fdb (diff) |
Facebook: Support for showing captcha codes; Raise version bump from previous commit
git-svn-id: http://svn.miranda-ng.org/main/trunk@10319 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index ec11ba3dec..c4f066ed0c 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -49,12 +49,12 @@ void FacebookProto::SendMsgWorker(void *p) } else { int retries = 5; std::string error_text = ""; - bool result = false; - while (!result && retries > 0) { + int result = SEND_MESSAGE_ERROR; + while (result == SEND_MESSAGE_ERROR && retries > 0) { result = facy.send_message(data->hContact, std::string(id), data->msg, &error_text, retries % 2 == 0 ? MESSAGE_INBOX : MESSAGE_MERCURY); retries--; } - if (result) { + if (result == SEND_MESSAGE_OK) { ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, data->msgid, 0); // Remove from "readers" list and clear statusbar @@ -100,7 +100,7 @@ void FacebookProto::SendChatMsgWorker(void *p) } if (!tid.empty()) { - if (facy.send_message(hContact, tid, data->msg, &err_message, MESSAGE_TID)) + if (facy.send_message(hContact, tid, data->msg, &err_message, MESSAGE_TID) == SEND_MESSAGE_OK) UpdateChat(_A2T(data->chat_id.c_str()), facy.self_.user_id.c_str(), facy.self_.real_name.c_str(), data->msg.c_str()); else UpdateChat(_A2T(data->chat_id.c_str()), NULL, NULL, err_message.c_str()); |