summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-30 13:35:41 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-30 13:35:41 +0300
commitc90272a48520b1937624c0058f94b06e536f5ff6 (patch)
tree61eb1096c0565273a08a54a9f528b1260fc5bddb /protocols/WhatsApp
parent5d016227186f7f272e2d423f0628e705187a2dc3 (diff)
code cleaning
Diffstat (limited to 'protocols/WhatsApp')
-rw-r--r--protocols/WhatsApp/src/iq.cpp3
-rw-r--r--protocols/WhatsApp/src/main.cpp10
-rw-r--r--protocols/WhatsApp/src/proto.h2
3 files changed, 0 insertions, 15 deletions
diff --git a/protocols/WhatsApp/src/iq.cpp b/protocols/WhatsApp/src/iq.cpp
index 7430abd44b..bf6b85febc 100644
--- a/protocols/WhatsApp/src/iq.cpp
+++ b/protocols/WhatsApp/src/iq.cpp
@@ -496,9 +496,6 @@ void WhatsAppProto::ProcessReceipt(MCONTACT hContact, const char *msgId, bool bR
if (hEvent == 0)
return;
- if (g_plugin.bHasMessageState)
- CallService(MS_MESSAGESTATE_UPDATE, hContact, bRead ? MRD_TYPE_READ : MRD_TYPE_DELIVERED);
-
if (bRead)
db_event_markRead(hContact, hEvent, true);
}
diff --git a/protocols/WhatsApp/src/main.cpp b/protocols/WhatsApp/src/main.cpp
index 20e8b83868..0bed10775b 100644
--- a/protocols/WhatsApp/src/main.cpp
+++ b/protocols/WhatsApp/src/main.cpp
@@ -39,18 +39,8 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
// Load
-static int OnPluginLoaded(WPARAM, LPARAM)
-{
- g_plugin.bHasMessageState = ServiceExists(MS_MESSAGESTATE_UPDATE);
- return 0;
-}
-
int CMPlugin::Load()
{
- HookEvent(ME_SYSTEM_MODULELOAD, OnPluginLoaded);
- HookEvent(ME_SYSTEM_MODULEUNLOAD, OnPluginLoaded);
- OnPluginLoaded(0, 0);
-
// special netlib user for reading avatars, blobs etc via HTTP protocol
NETLIBUSER nlu = {};
nlu.flags = NUF_INCOMING | NUF_OUTGOING | NUF_HTTPCONNS | NUF_UNICODE;
diff --git a/protocols/WhatsApp/src/proto.h b/protocols/WhatsApp/src/proto.h
index a5c7400fa5..7f87fe2f9a 100644
--- a/protocols/WhatsApp/src/proto.h
+++ b/protocols/WhatsApp/src/proto.h
@@ -501,8 +501,6 @@ struct CMPlugin : public ACCPROTOPLUGIN<WhatsAppProto>
HNETLIBCONN hAvatarConn = nullptr;
bool SaveFile(const char *pszUrl, PROTO_AVATAR_INFORMATION &ai);
- bool bHasMessageState = false;
-
CMPlugin();
int Load() override;