summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-11 17:38:07 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-11 17:38:07 +0300
commit89b201f63f600d303b4f7b5bd2a6c199c4964d85 (patch)
tree84b7ed045bb106b7e83c162725a73ed37fb6c268
parent2c2c6484dc2eb7b3da52f9054435dc680f64b132 (diff)
fixes #4652 (Telegram: при удалении чатов игнорируется состояние галки "удалить контакт с сервера")
-rw-r--r--protocols/Telegram/src/proto.cpp5
1 files changed, 3 insertions, 2 deletions
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<TD::int53> ids;
ids.push_back(id);
SendQuery(new TD::removeContacts(std::move(ids)));