mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 22:46:10 +00:00
Handle disabling direct messages in channel.
This commit is contained in:
@@ -1542,6 +1542,9 @@ Data::RestrictionCheckResult PeerData::amRestricted(
|
||||
: Result::Explicit())
|
||||
: Result::Allowed();
|
||||
} else if (const auto channel = asChannel()) {
|
||||
if (channel->monoforumDisabled()) {
|
||||
return Result::WithEveryone();
|
||||
}
|
||||
const auto defaultRestrictions = channel->defaultRestrictions()
|
||||
| (channel->isPublic()
|
||||
? (ChatRestriction::PinMessages
|
||||
|
Reference in New Issue
Block a user