summaryrefslogtreecommitdiff
path: root/protocols/Telegram
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2024-09-05 17:49:20 +0300
committerGeorge Hazan <george.hazan@gmail.com>2024-09-05 17:49:20 +0300
commit7ced6103bd526de1980707bc019b03b2f0b64d00 (patch)
treed1b2790c7a965cd59a8c703c4b36e2cb3fe09650 /protocols/Telegram
parent0de110aba737630e5e8139cc0eb3d7aff0a286de (diff)
fixes #4611 (Telegram: невозможно удалить своё сообщение у других участников чата)
Diffstat (limited to 'protocols/Telegram')
-rw-r--r--protocols/Telegram/src/server.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/protocols/Telegram/src/server.cpp b/protocols/Telegram/src/server.cpp
index cee7b9b1c3..f7ef21a95f 100644
--- a/protocols/Telegram/src/server.cpp
+++ b/protocols/Telegram/src/server.cpp
@@ -502,7 +502,8 @@ INT_PTR CTelegramProto::SvcCanEmptyHistory(WPARAM hContact, LPARAM)
{
if (auto *pUser = FindUser(GetId(hContact))) {
TG_SUPER_GROUP tmp(pUser->id, 0);
- return m_arSuperGroups.find(&tmp) == nullptr;
+ if (auto *pGroup = m_arSuperGroups.find(&tmp))
+ return !pGroup->group->is_channel_;
}
return 0;