2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Respect boosts restrictions lifting.

This commit is contained in:
John Preston
2024-02-06 17:32:25 +04:00
parent 180b14ea36
commit ea12c2f62c
6 changed files with 35 additions and 11 deletions

View File

@@ -1122,7 +1122,8 @@ Data::RestrictionCheckResult PeerData::amRestricted(
: ChatRestrictions(0));
return (channel->amCreator() || allowByAdminRights(right, channel))
? Result::Allowed()
: (defaultRestrictions & right)
: ((defaultRestrictions & right)
&& !channel->unrestrictedByBoosts())
? Result::WithEveryone()
: (channel->restrictions() & right)
? Result::Explicit()