From 89b201f63f600d303b4f7b5bd2a6c199c4964d85 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 11 Sep 2024 17:38:07 +0300 Subject: =?UTF-8?q?fixes=20#4652=20(Telegram:=20=D0=BF=D1=80=D0=B8=20?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B5=D0=BD=D0=B8=D0=B8=20=D1=87=D0=B0?= =?UTF-8?q?=D1=82=D0=BE=D0=B2=20=D0=B8=D0=B3=D0=BD=D0=BE=D1=80=D0=B8=D1=80?= =?UTF-8?q?=D1=83=D0=B5=D1=82=D1=81=D1=8F=20=D1=81=D0=BE=D1=81=D1=82=D0=BE?= =?UTF-8?q?=D1=8F=D0=BD=D0=B8=D0=B5=20=D0=B3=D0=B0=D0=BB=D0=BA=D0=B8=20"?= =?UTF-8?q?=D1=83=D0=B4=D0=B0=D0=BB=D0=B8=D1=82=D1=8C=20=D0=BA=D0=BE=D0=BD?= =?UTF-8?q?=D1=82=D0=B0=D0=BA=D1=82=20=D1=81=20=D1=81=D0=B5=D1=80=D0=B2?= =?UTF-8?q?=D0=B5=D1=80=D0=B0")?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- protocols/Telegram/src/proto.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'protocols/Telegram/src') diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index a87c824bde..7d552efe27 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -145,8 +145,9 @@ bool CTelegramProto::OnContactDeleted(MCONTACT hContact, uint32_t flags) if (id == 0) return false; + bool bDelContact = (flags & CDF_DEL_CONTACT) != 0; if (auto *pUser = FindUser(id)) { - if (pUser->m_si) { + if (pUser->m_si && bDelContact) { SvcLeaveChat(hContact, 0); return false; } @@ -157,7 +158,7 @@ bool CTelegramProto::OnContactDeleted(MCONTACT hContact, uint32_t flags) pUser->wszLastName = getMStringW(hContact, "LastName"); } - if (flags & CDF_DEL_CONTACT) { + if (bDelContact) { TD::array ids; ids.push_back(id); SendQuery(new TD::removeContacts(std::move(ids))); -- cgit v1.2.3