summaryrefslogtreecommitdiff
path: root/protocols/Discord
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/Discord
parentc400f5c17af4996eb2ecf0597e17eb25c17857d8 (diff)
fixes #3674 (Реакция протоколов на отсылку в оффлайн)
Diffstat (limited to 'protocols/Discord')
-rw-r--r--protocols/Discord/src/proto.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/Discord/src/proto.cpp b/protocols/Discord/src/proto.cpp
index de9619dda3..ed5b6e365b 100644
--- a/protocols/Discord/src/proto.cpp
+++ b/protocols/Discord/src/proto.cpp
@@ -480,12 +480,10 @@ void CDiscordProto::OnSendMsg(NETLIBHTTPREQUEST *pReply, AsyncHttpRequest *pReq)
}
}
-int CDiscordProto::SendMsg(MCONTACT hContact, int /*flags*/, const char *pszSrc)
+int CDiscordProto::SendMsg(MCONTACT hContact, int, const char *pszSrc)
{
- if (!m_bOnline) {
- ProtoBroadcastAsync(hContact, ACKTYPE_MESSAGE, ACKRESULT_FAILED, (HANDLE)1, (LPARAM)TranslateT("Protocol is offline or user isn't authorized yet"));
- return 1;
- }
+ if (!m_bOnline)
+ return -1;
ptrW wszText(mir_utf8decodeW(pszSrc));
if (wszText == nullptr)