2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 00:46:08 +00:00

Allow enabling direct messages in channels.

This commit is contained in:
John Preston
2025-05-06 17:48:18 +04:00
parent 23eedb468f
commit d3f9a84a0a
39 changed files with 685 additions and 242 deletions

View File

@@ -269,6 +269,7 @@ inline auto DefaultRestrictionValue(
| Flag::Left
| Flag::Forum
| Flag::JoinToWrite
| Flag::Monoforum
| Flag::HasLink
| Flag::Forbidden
| Flag::Creator
@@ -292,7 +293,8 @@ inline auto DefaultRestrictionValue(
&& (flags & Flag::Forum);
const auto allowed = !(flags & notAmInFlags)
|| ((flags & Flag::HasLink)
&& !(flags & Flag::JoinToWrite));
&& !(flags & Flag::JoinToWrite))
|| (flags & Flag::Monoforum);
const auto restricted = sendRestriction
| (defaultSendRestriction && !unrestrictedByBoosts);
return allowed