From 06e159dd5fdcf09d98ca013ce7a1231bf0751205 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 24 Jan 2024 16:16:01 +0300 Subject: Telegram: activating flags for deleting contact --- protocols/Telegram/src/proto.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'protocols') diff --git a/protocols/Telegram/src/proto.cpp b/protocols/Telegram/src/proto.cpp index 9b9b9bb4f5..3b79b01e66 100644 --- a/protocols/Telegram/src/proto.cpp +++ b/protocols/Telegram/src/proto.cpp @@ -117,13 +117,16 @@ void CTelegramProto::OnContactAdded(MCONTACT hContact) } } -bool CTelegramProto::OnContactDeleted(MCONTACT hContact, uint32_t) +bool CTelegramProto::OnContactDeleted(MCONTACT hContact, uint32_t flags) { TD::int53 id = GetId(hContact); if (id == 0) return false; if (auto *pUser = FindUser(id)) { + if (flags & CDF_DEL_HISTORY) + SvcEmptyServerHistory(hContact, flags); + if (pUser->m_si) { SvcLeaveChat(hContact, 0); return false; -- cgit v1.2.3