diff options
author | George Hazan <george.hazan@gmail.com> | 2023-09-15 14:22:08 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2023-09-15 14:22:13 +0300 |
commit | 67382bca8cdfb020a56dbab3087233c3f1034426 (patch) | |
tree | d4cffadcf330cce5527c3b021fcf799f02c17c76 /protocols/WhatsApp | |
parent | c400f5c17af4996eb2ecf0597e17eb25c17857d8 (diff) |
fixes #3674 (Реакция протоколов на отсылку в оффлайн)
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r-- | protocols/WhatsApp/src/proto.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index be3526d996..917ca012aa 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -245,15 +245,13 @@ int WhatsAppProto::SetStatus(int iNewStatus) int WhatsAppProto::SendMsg(MCONTACT hContact, int, const char *pszMsg)
{
+ if (!isOnline())
+ return -1;
+
ptrA jid(getStringA(hContact, DBKEY_ID));
if (jid == nullptr || pszMsg == nullptr)
return 0;
- if (!isOnline()) {
- debugLogA("No connection");
- return 0;
- }
-
return SendTextMessage(jid, pszMsg);
}
|