summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2023-09-15 14:22:08 +0300
committerGeorge Hazan <george.hazan@gmail.com>2023-09-15 14:22:13 +0300
commit67382bca8cdfb020a56dbab3087233c3f1034426 (patch)
treed4cffadcf330cce5527c3b021fcf799f02c17c76 /protocols/Tox
parentc400f5c17af4996eb2ecf0597e17eb25c17857d8 (diff)
fixes #3674 (Реакция протоколов на отсылку в оффлайн)
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/src/tox_messages.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/Tox/src/tox_messages.cpp b/protocols/Tox/src/tox_messages.cpp
index 306fbf9312..264385db69 100644
--- a/protocols/Tox/src/tox_messages.cpp
+++ b/protocols/Tox/src/tox_messages.cpp
@@ -110,10 +110,8 @@ void CToxProto::SendMessageAsync(void *arg)
int CToxProto::OnSendMessage(MCONTACT hContact, const char *szMessage)
{
- if (!IsOnline()) {
- ProtoBroadcastAck(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, nullptr, (LPARAM)TranslateT("You cannot send when you are offline."));
- return 0;
- }
+ if (!IsOnline())
+ return -1;
UINT hMessage = InterlockedIncrement(&hMessageProcess);