mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2026-07-25 06:54:43 +00:00
Handle disabling direct messages in channel.
This commit is contained in:
@@ -273,7 +273,8 @@ inline auto DefaultRestrictionValue(
|
||||
| Flag::HasLink
|
||||
| Flag::Forbidden
|
||||
| Flag::Creator
|
||||
| Flag::Broadcast;
|
||||
| Flag::Broadcast
|
||||
| Flag::MonoforumDisabled;
|
||||
return rpl::combine(
|
||||
PeerFlagsValue(channel, mask),
|
||||
AdminRightValue(
|
||||
@@ -288,6 +289,9 @@ inline auto DefaultRestrictionValue(
|
||||
bool unrestrictedByBoosts,
|
||||
ChatRestrictions sendRestriction,
|
||||
ChatRestrictions defaultSendRestriction) {
|
||||
if (flags & Flag::MonoforumDisabled) {
|
||||
return false;
|
||||
}
|
||||
const auto notAmInFlags = Flag::Left | Flag::Forbidden;
|
||||
const auto forumRestriction = forbidInForums
|
||||
&& (flags & Flag::Forum);
|
||||
|
||||
Reference in New Issue
Block a user