From cdaa23363fd0404fd9e6cc9fa3b26a87c522ee04 Mon Sep 17 00:00:00 2001 From: John Preston Date: Thu, 1 Feb 2024 17:51:54 +0400 Subject: [PATCH] Allow reaction reports in public groups. --- .../info/profile/info_profile_actions.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp index eb775b0c9e..cd78b8d93d 100644 --- a/Telegram/SourceFiles/info/profile/info_profile_actions.cpp +++ b/Telegram/SourceFiles/info/profile/info_profile_actions.cpp @@ -724,16 +724,20 @@ void DetailsFiller::addReportReaction(Ui::MultiSlideTracker &tracker) { const auto user = _peer->asUser(); if (_peer->isSelf()) { return; +#if 0 // Only public groups allow reaction reports for now. } else if (const auto chat = data.group->asChat()) { const auto ban = chat->canBanMembers() && (!user || !chat->admins.contains(_peer)) && (!user || chat->creator != user->id); addReportReaction(data, ban, tracker); +#endif } else if (const auto channel = data.group->asMegagroup()) { - const auto ban = channel->canBanMembers() - && (!user || !channel->mgInfo->admins.contains(user->id)) - && (!user || channel->mgInfo->creator != user); - addReportReaction(data, ban, tracker); + if (channel->isPublic()) { + const auto ban = channel->canBanMembers() + && (!user || !channel->mgInfo->admins.contains(user->id)) + && (!user || channel->mgInfo->creator != user); + addReportReaction(data, ban, tracker); + } } }, [](const auto &) {}); }