diff options
author | George Hazan <ghazan@miranda.im> | 2023-02-23 19:41:54 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-02-23 19:41:54 +0300 |
commit | bddc397fa9e6c164d0288b4665fa10806f8363fa (patch) | |
tree | 5b45c7981815f1ea346878106d4725f688b88014 /protocols/Telegram/src/groupchat.cpp | |
parent | 87ffacfcb26cb3e6378d3d4189cc565d5f487103 (diff) |
Telegram: patch to hide nick list for channels
Diffstat (limited to 'protocols/Telegram/src/groupchat.cpp')
-rw-r--r-- | protocols/Telegram/src/groupchat.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/protocols/Telegram/src/groupchat.cpp b/protocols/Telegram/src/groupchat.cpp index fdcb45faa7..0aa21fb752 100644 --- a/protocols/Telegram/src/groupchat.cpp +++ b/protocols/Telegram/src/groupchat.cpp @@ -24,9 +24,10 @@ void CTelegramProto::InitGroupChat(TG_USER *pUser, const TD::chat *pChat, bool b wchar_t wszId[100]; _i64tow(pUser->id, wszId, 10); - auto *si = pUser->m_si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszId, Utf2T(pChat->title_.c_str()), pUser); + SESSION_INFO *si; if (bUpdateMembers) { + si = Chat_NewSession(GCW_CHATROOM, m_szModuleName, wszId, Utf2T(pChat->title_.c_str()), pUser); Chat_AddGroup(si, TranslateT("Creator")); Chat_AddGroup(si, TranslateT("Admin")); Chat_AddGroup(si, TranslateT("Participant")); @@ -35,6 +36,7 @@ void CTelegramProto::InitGroupChat(TG_USER *pUser, const TD::chat *pChat, bool b SendQuery(new TD::getBasicGroupFullInfo(pUser->id), &CTelegramProto::StartGroupChat, pUser); } else { + si = Chat_NewSession(GCW_CHANNEL, m_szModuleName, wszId, Utf2T(pChat->title_.c_str()), pUser); Chat_AddGroup(si, TranslateT("SuperAdmin")); Chat_AddGroup(si, TranslateT("Visitor")); @@ -56,6 +58,8 @@ void CTelegramProto::InitGroupChat(TG_USER *pUser, const TD::chat *pChat, bool b Chat_Control(si, m_bHideGroupchats ? WINDOW_HIDDEN : SESSION_INITDONE); Chat_Control(si, SESSION_ONLINE); } + + pUser->m_si = si; } void CTelegramProto::StartGroupChat(td::ClientManager::Response &response, void *pUserData) |