diff options
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 bb123962e7..6d89c31b98 100644 --- a/protocols/FacebookRM/src/messages.cpp +++ b/protocols/FacebookRM/src/messages.cpp @@ -48,12 +48,13 @@ void FacebookProto::SendMsgWorker(void *p) ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)data->msgid, 0); } else { - int retries = 5; + int tries = getByte(FACEBOOK_KEY_SEND_MESSAGE_TRIES, 1); + tries = min(max(tries, 1), 5); + std::string error_text; int result = SEND_MESSAGE_ERROR; - while (result == SEND_MESSAGE_ERROR && retries > 0) { + while (result == SEND_MESSAGE_ERROR && tries-- > 0) { result = facy.send_message(data->msgid, data->hContact, data->msg, &error_text); - retries--; } if (result == SEND_MESSAGE_OK) { ProtoBroadcastAck(data->hContact, ACKTYPE_MESSAGE, ACKRESULT_SUCCESS, (HANDLE)data->msgid, 0); |