From f2daa4597c4b35578ccfba1127604cd5e07d6aa2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 20 May 2024 21:51:34 +0300 Subject: =?UTF-8?q?fixes=20#4422=20(Telegram:=20=D0=B4=D0=BE=D0=B1=D0=B0?= =?UTF-8?q?=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D0=B5=20=D0=B2=20=D1=87=D0=B0?= =?UTF-8?q?=D1=82=20=D1=81=D1=80=D0=B5=D0=B4=D1=81=D1=82=D0=B2=D0=B0=D0=BC?= =?UTF-8?q?=D0=B8=20=D0=9C=D0=B8=D1=80=D0=B0=D0=BD=D0=B4=D1=8B)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Telegram/src/proto.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'protocols/Telegram/src/proto.cpp') diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index 94c26a3d62..5c3316484b 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -287,10 +287,18 @@ MCONTACT CTelegramProto::AddToList(int flags, PROTOSEARCHRESULT *psr) return 0; auto id = _wtoi64(psr->id.w); + auto *pUser = AddUser(id, false); if (flags & PALF_TEMPORARY) Contact::RemoveFromList(pUser->hContact); + if (auto *pChat = FindUser(id)) { + if (pChat->isGroupChat) { + SendQuery(new TD::joinChat(pChat->chatId)); + return pUser->hContact; + } + } + auto cc = TD::make_object(); cc->user_id_ = id; if (psr->firstName.w) -- cgit v1.2.3