summaryrefslogtreecommitdiff
path: root/protocols/Telegram
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Telegram')
-rw-r--r--protocols/Telegram/src/mt_proto.cpp17
-rw-r--r--protocols/Telegram/src/stdafx.h2
2 files changed, 19 insertions, 0 deletions
diff --git a/protocols/Telegram/src/mt_proto.cpp b/protocols/Telegram/src/mt_proto.cpp
index eb5c7be0ee..90e6e9c68f 100644
--- a/protocols/Telegram/src/mt_proto.cpp
+++ b/protocols/Telegram/src/mt_proto.cpp
@@ -23,6 +23,23 @@ CMTProto::CMTProto(const char* protoName, const wchar_t* userName) :
CreateProtoService(PS_CREATEACCMGRUI, &CMTProto::SvcCreateAccMgrUI);
HookProtoEvent(ME_OPT_INITIALISE, &CMTProto::OnOptionsInit);
+
+ // Create standard network connection
+ NETLIBUSER nlu = {};
+ nlu.flags = NUF_UNICODE;
+ nlu.szSettingsModule = m_szModuleName;
+ nlu.szDescriptiveName.w = m_tszUserName;
+ m_hNetlibUser = Netlib_RegisterUser(&nlu);
+
+ // groupchat initialization
+ GCREGISTER gcr = {};
+ gcr.dwFlags = GC_TYPNOTIF | GC_DATABASE;
+ gcr.ptszDispName = m_tszUserName;
+ gcr.pszModule = m_szModuleName;
+ Chat_Register(&gcr);
+
+ // HookProtoEvent(ME_GC_EVENT, &WhatsAppProto::GcEventHook);
+ // HookProtoEvent(ME_GC_BUILDMENU, &WhatsAppProto::GcMenuHook);
}
CMTProto::~CMTProto()
diff --git a/protocols/Telegram/src/stdafx.h b/protocols/Telegram/src/stdafx.h
index dc9121cfb8..957cb73f55 100644
--- a/protocols/Telegram/src/stdafx.h
+++ b/protocols/Telegram/src/stdafx.h
@@ -12,11 +12,13 @@
#include <m_protosvc.h>
#include <m_clist.h>
+#include <m_chat.h>
#include <m_contacts.h>
#include <m_database.h>
#include <m_extraicons.h>
#include <m_icolib.h>
#include <m_langpack.h>
+#include <m_netlib.h>
#include <m_options.h>
#include <m_popup.h>