diff options
author | Robert Pösel <robyer@seznam.cz> | 2012-10-22 19:31:16 +0000 |
---|---|---|
committer | Robert Pösel <robyer@seznam.cz> | 2012-10-22 19:31:16 +0000 |
commit | 3f36fc000f39da00d7865204ba4d00e745e0b822 (patch) | |
tree | 16611b6c708dee523617b22b0020d27976289f79 /protocols/FacebookRM/src/messages.cpp | |
parent | b5fe64e5a68edb20010744bcb65c3bb4d43af597 (diff) |
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
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 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;
}
|