mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-31 06:26:18 +00:00
Handle join-to-write / request-to-join in comments section.
This commit is contained in:
@@ -467,7 +467,8 @@ bool ChannelData::canPublish() const {
|
||||
|
||||
bool ChannelData::canWrite() const {
|
||||
// Duplicated in Data::CanWriteValue().
|
||||
const auto allowed = amIn() || (flags() & Flag::HasLink);
|
||||
const auto allowed = amIn()
|
||||
|| ((flags() & Flag::HasLink) && !(flags() & Flag::JoinToWrite));
|
||||
return allowed && (canPublish()
|
||||
|| (!isBroadcast()
|
||||
&& !amRestricted(Restriction::SendMessages)));
|
||||
|
Reference in New Issue
Block a user