diff options
author | Robert Pösel <robyer@seznam.cz> | 2014-11-26 08:44:18 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2014-11-26 08:44:18 +0000 |
commit | c1d2d5892eda3070975bbb82ac4f2e35d7bc139e (patch) | |
tree | 5902759b93eed462f1b8815a19b9f9e35d674046 /protocols/FacebookRM/src/messages.cpp | |
parent | f5e38aaba573fa720894433ae746b3a7a741356e (diff) |
Facebook: Various optimizations and cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@11083 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/FacebookRM/src/messages.cpp')
-rw-r--r-- | protocols/FacebookRM/src/messages.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 269c0aeb91..d25514fb4a 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -47,7 +47,7 @@ void FacebookProto::SendMsgWorker(void *p) ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, data->msgid, 0); } else { int retries = 5; - std::string error_text = ""; + std::string error_text; 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); @@ -73,7 +73,7 @@ void FacebookProto::SendChatMsgWorker(void *p) return; send_chat *data = static_cast<send_chat*>(p); - std::string err_message = ""; + std::string err_message; // replace %% back to %, because chat automatically does this to sent messages utils::text::replace_all(&data->msg, "%%", "%"); @@ -194,7 +194,7 @@ void FacebookProto::ReadMessageWorker(void *p) facy.flap(REQUEST_MARK_READ, &data); } -void FacebookProto::StickerAsSmiley(std::string sticker, std::string url, MCONTACT hContact) +void FacebookProto::StickerAsSmiley(std::string sticker, const std::string &url, MCONTACT hContact) { std::string b64 = ptrA( mir_base64_encode((PBYTE)sticker.c_str(), (unsigned)sticker.length())); b64 = utils::url::encode(b64); |