diff options
Diffstat (limited to 'protocols/WhatsAppWeb/src/chats.cpp')
-rw-r--r-- | protocols/WhatsAppWeb/src/chats.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/protocols/WhatsAppWeb/src/chats.cpp b/protocols/WhatsAppWeb/src/chats.cpp new file mode 100644 index 0000000000..d8837aff43 --- /dev/null +++ b/protocols/WhatsAppWeb/src/chats.cpp @@ -0,0 +1,19 @@ +/* + +WhatsAppWeb plugin for Miranda NG +Copyright © 2019 George Hazan + +*/ + +#include "stdafx.h" + +void WhatsAppProto::InitChat(WAUser *pUser, const JSONNode &pRoot) +{ + CMStringW wszId(pRoot["jid"].as_mstring()), wszNick(pRoot["name"].as_mstring()); + + setWString(pUser->hContact, "Nick", wszNick); + + pUser->si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszId, wszNick); + Chat_Control(m_szModuleName, wszId, m_bHideGroupchats ? WINDOW_HIDDEN : SESSION_INITDONE); + Chat_Control(m_szModuleName, wszId, SESSION_ONLINE); +} |