summaryrefslogtreecommitdiff
path: root/protocols/Telegram/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-12-14 18:31:57 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-12-14 18:31:57 +0300
commite96460d6ec66dd02a32e9667333b3f2e418519f8 (patch)
treeddfcf1b849194f151fb66953818810d1921b82b7 /protocols/Telegram/src
parent1885f8d2173768ae3a4bbd80b6a12dad24591fd9 (diff)
fixes #3263 (Telegram: протокол отсутствует в настройках нетлога)
Diffstat (limited to 'protocols/Telegram/src')
-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>