2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-05 17:06:03 +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

@@ -159,7 +159,8 @@ bool CanSendAnyOf(
using Flag = ChannelDataFlag;
const auto allowed = channel->amIn()
|| ((channel->flags() & Flag::HasLink)
&& !(channel->flags() & Flag::JoinToWrite));
&& !(channel->flags() & Flag::JoinToWrite))
|| channel->isMonoforum();
if (!allowed || (forbidInForums && channel->isForum())) {
return false;
} else if (channel->canPostMessages()) {