summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/main.cpp')
-rw-r--r--protocols/WhatsApp/src/main.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/protocols/WhatsApp/src/main.cpp b/protocols/WhatsApp/src/main.cpp
index ffd3766719..99bf1e37f8 100644
--- a/protocols/WhatsApp/src/main.cpp
+++ b/protocols/WhatsApp/src/main.cpp
@@ -45,11 +45,19 @@ CMPlugin::CMPlugin() :
/////////////////////////////////////////////////////////////////////////////////////////
// Load
+static int OnPluginLoaded(WPARAM, LPARAM)
+{
+ g_plugin.bHasMessageState = ServiceExists(MS_MESSAGESTATE_UPDATE);
+ return 0;
+}
+
int CMPlugin::Load()
{
- // InitIcons();
- // InitContactMenus();
+ 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;
nlu.szSettingsModule = "WhatsApp";