mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-09-02 23:45:44 +00:00
Respect boosts restrictions lifting.
This commit is contained in:
@@ -267,11 +267,13 @@ inline auto DefaultRestrictionValue(
|
||||
AdminRightValue(
|
||||
channel,
|
||||
ChatAdminRight::PostMessages),
|
||||
channel->unrestrictedByBoostsValue(),
|
||||
RestrictionsValue(channel, rights),
|
||||
DefaultRestrictionsValue(channel, rights),
|
||||
[=](
|
||||
ChannelDataFlags flags,
|
||||
bool postMessagesRight,
|
||||
bool unrestrictedByBoosts,
|
||||
ChatRestrictions sendRestriction,
|
||||
ChatRestrictions defaultSendRestriction) {
|
||||
const auto notAmInFlags = Flag::Left | Flag::Forbidden;
|
||||
@@ -281,7 +283,7 @@ inline auto DefaultRestrictionValue(
|
||||
|| ((flags & Flag::HasLink)
|
||||
&& !(flags & Flag::JoinToWrite));
|
||||
const auto restricted = sendRestriction
|
||||
| defaultSendRestriction;
|
||||
| (defaultSendRestriction && !unrestrictedByBoosts);
|
||||
return allowed
|
||||
&& !forumRestriction
|
||||
&& (postMessagesRight
|
||||
|
Reference in New Issue
Block a user