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
+2 -1
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()