From 67382bca8cdfb020a56dbab3087233c3f1034426 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 15 Sep 2023 14:22:08 +0300 Subject: =?UTF-8?q?fixes=20#3674=20(=D0=A0=D0=B5=D0=B0=D0=BA=D1=86=D0=B8?= =?UTF-8?q?=D1=8F=20=D0=BF=D1=80=D0=BE=D1=82=D0=BE=D0=BA=D0=BE=D0=BB=D0=BE?= =?UTF-8?q?=D0=B2=20=D0=BD=D0=B0=20=D0=BE=D1=82=D1=81=D1=8B=D0=BB=D0=BA?= =?UTF-8?q?=D1=83=20=D0=B2=20=D0=BE=D1=84=D1=84=D0=BB=D0=B0=D0=B9=D0=BD)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Discord/src/proto.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'protocols/Discord') 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) -- cgit v1.2.3