diff options
author | George Hazan <ghazan@miranda.im> | 2022-10-03 20:00:41 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2022-10-03 20:00:41 +0300 |
commit | cc0cde8d87358738bcad304e8bdc9c944d55cdaa (patch) | |
tree | c6615f01402c324e349437ebd3575c94d48ddaf6 /protocols/WhatsAppWeb/src/proto.cpp | |
parent | f23e1a5e267d9feec25b3a8a2f26017d03963f25 (diff) |
WhatsApp:
- nick name added to all options dialogs;
- added error popups;
Diffstat (limited to 'protocols/WhatsAppWeb/src/proto.cpp')
-rw-r--r-- | protocols/WhatsAppWeb/src/proto.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/protocols/WhatsAppWeb/src/proto.cpp b/protocols/WhatsAppWeb/src/proto.cpp index c29a7d60d9..1aa6117446 100644 --- a/protocols/WhatsAppWeb/src/proto.cpp +++ b/protocols/WhatsAppWeb/src/proto.cpp @@ -36,7 +36,9 @@ WhatsAppProto::WhatsAppProto(const char *proto_name, const wchar_t *username) : m_arOwnMsgs(1, CompareOwnMsgs), m_arPersistent(1), m_arPacketQueue(10), + m_wszNick(this, "Nick"), m_wszDefaultGroup(this, "DefaultGroup", L"WhatsApp"), + m_bUsePopups(this, "UsePopups", true), m_bHideGroupchats(this, "HideChats", true) { db_set_resident(m_szModuleName, "StatusMsg"); @@ -50,6 +52,7 @@ WhatsAppProto::WhatsAppProto(const char *proto_name, const wchar_t *username) : HookProtoEvent(ME_OPT_INITIALISE, &WhatsAppProto::OnOptionsInit); + InitPopups(); InitPersistentHandlers(); // Create standard network connection @@ -136,8 +139,12 @@ int WhatsAppProto::SetStatus(int new_status) if (m_iDesiredStatus == new_status) return 0; + if (!mir_wstrlen(m_wszNick)) { + Popup(0, LPGENW("You need to specify nick name in the Options dialog"), LPGENW("Error")); + return 0; + } + int oldStatus = m_iStatus; - debugLogA("===== Beginning SetStatus process"); // Routing statuses not supported by WhatsApp switch (new_status) { |