diff options
Diffstat (limited to 'protocols/WhatsApp/src/proto.cpp')
-rw-r--r-- | protocols/WhatsApp/src/proto.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/protocols/WhatsApp/src/proto.cpp b/protocols/WhatsApp/src/proto.cpp index b4cb2bf683..75ff99c887 100644 --- a/protocols/WhatsApp/src/proto.cpp +++ b/protocols/WhatsApp/src/proto.cpp @@ -67,7 +67,12 @@ WhatsAppProto::~WhatsAppProto() int WhatsAppProto::OnEvent(PROTOEVENTTYPE evType, WPARAM wParam, LPARAM lParam)
{
- if (evType == EV_PROTO_ONLOAD) {
+ switch (evType) {
+ case EV_PROTO_ONMENU:
+ InitMenu();
+ break;
+
+ case EV_PROTO_ONLOAD:
// Register group chat
GCREGISTER gcr = { sizeof(gcr) };
gcr.dwFlags = GC_TYPNOTIF | GC_CHANMGR;
@@ -78,6 +83,7 @@ int WhatsAppProto::OnEvent(PROTOEVENTTYPE evType, WPARAM wParam, LPARAM lParam) HookProtoEvent(ME_GC_EVENT, &WhatsAppProto::onGroupChatEvent);
HookProtoEvent(ME_GC_BUILDMENU, &WhatsAppProto::OnChatMenu);
HookProtoEvent(ME_USERINFO_INITIALISE, &WhatsAppProto::OnUserInfo);
+ break;
}
return TRUE;
}
|