From c90272a48520b1937624c0058f94b06e536f5ff6 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 30 Sep 2024 13:35:41 +0300 Subject: code cleaning --- protocols/WhatsApp/src/iq.cpp | 3 --- protocols/WhatsApp/src/main.cpp | 10 ---------- protocols/WhatsApp/src/proto.h | 2 -- 3 files changed, 15 deletions(-) (limited to 'protocols/WhatsApp') 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 HNETLIBCONN hAvatarConn = nullptr; bool SaveFile(const char *pszUrl, PROTO_AVATAR_INFORMATION &ai); - bool bHasMessageState = false; - CMPlugin(); int Load() override; -- cgit v1.2.3