From a4c4e3fc08395be5fc83b6f36fc1be07dbe5b245 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 21 Nov 2023 19:02:12 +0300 Subject: =?UTF-8?q?fixes=20#3945=20(=D0=9F=D0=BB=D0=B0=D0=B3=D0=B8=D0=BD?= =?UTF-8?q?=D1=8B=20=D1=81=D0=BE=D0=BE=D0=B1=D1=89=D0=B5=D0=BD=D0=B8=D0=B9?= =?UTF-8?q?:=20=D1=81=D0=BA=D1=80=D1=8B=D0=B2=D0=B0=D1=82=D1=8C=20=D1=8D?= =?UTF-8?q?=D0=BB=D0=B5=D0=BC=D0=B5=D0=BD=D1=82=D1=8B=20=D0=BE=D0=BA=D0=BD?= =?UTF-8?q?=D0=B0=20=D0=B2=20=D0=B7=D0=B0=D0=B2=D0=B8=D1=81=D0=B8=D0=BC?= =?UTF-8?q?=D0=BE=D1=81=D1=82=D0=B8=20=D0=BE=D1=82=20=D1=82=D0=B8=D0=BF?= =?UTF-8?q?=D0=B0=20=D0=BF=D1=80=D0=B8=D0=B2=D0=B0=D1=82=D0=B0)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Telegram/src/server.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'protocols/Telegram/src') diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp index 80c25d9b95..9baa1fe26c 100644 --- a/protocols/Telegram/src/server.cpp +++ b/protocols/Telegram/src/server.cpp @@ -487,8 +487,13 @@ void CTelegramProto::ProcessChat(TD::updateNewChat *pObj) if (CheckSearchUser(pUser)) return; - if (pUser->isGroupChat && pUser->hContact != INVALID_CONTACT_ID) - InitGroupChat(pUser, pChat); + if (pUser->hContact != INVALID_CONTACT_ID) { + if (pChat->permissions_) + Contact::Readonly(hContact, !pChat->permissions_->can_send_basic_messages_); + + if (pUser->isGroupChat) + InitGroupChat(pUser, pChat); + } } else debugLogA("Unknown user id %lld, ignoring", userId); } -- cgit v1.2.3