2
0
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:
John Preston
2025-06-05 14:58:45 +04:00
parent 73ea86ceeb
commit dc61faace1
8 changed files with 66 additions and 10 deletions

View File

@@ -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