From 3f36fc000f39da00d7865204ba4d00e745e0b822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Mon, 22 Oct 2012 19:31:16 +0000 Subject: Facebook: Reworked sending messages requests (should avoid rare ban from FB :)) git-svn-id: http://svn.miranda-ng.org/main/trunk@2050 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/FacebookRM/src/messages.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'protocols/FacebookRM/src/messages.cpp') diff --git a/protocols/FacebookRM/src/messages.cpp b/protocols/FacebookRM/src/messages.cpp index 8b27b4721f..596fab0424 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -58,7 +58,7 @@ void FacebookProto::SendMsgWorker(void *p) std::string error_text = ""; bool result = false; while (!result && retries > 0) { - result = facy.send_message(dbv.pszVal, data->msg, &error_text, retries % 2 == 0 ); + result = facy.send_message(dbv.pszVal, data->msg, &error_text, retries % 2 == 0 ? MESSAGE_INBOX : MESSAGE_MERCURY); retries--; } if (result) { @@ -104,7 +104,7 @@ void FacebookProto::SendChatMsgWorker(void *p) } if (!tid.empty()) - facy.send_message(tid, data->msg, &err_message, false, true ); + facy.send_message(tid, data->msg, &err_message, MESSAGE_TID); } delete data; @@ -117,14 +117,14 @@ int FacebookProto::SendMsg(HANDLE hContact, int flags, const char *msg) msg = mir_utf8encode(msg); facy.msgid_ = (facy.msgid_ % 1024)+1; - ForkThread( &FacebookProto::SendMsgWorker, this,new send_direct(hContact,msg,(HANDLE)facy.msgid_)); + ForkThread( &FacebookProto::SendMsgWorker, this, new send_direct(hContact, msg, (HANDLE)facy.msgid_)); return facy.msgid_; } int FacebookProto::UserIsTyping(HANDLE hContact,int type) { if (hContact && isOnline()) - ForkThread(&FacebookProto::SendTypingWorker, this,new send_typing(hContact,type)); + ForkThread(&FacebookProto::SendTypingWorker, this, new send_typing(hContact, type)); return 0; } -- cgit v1.2.3