Removed ttl menu from inaccessible groups and channels.

This commit is contained in:
23rd 2022-04-28 15:13:58 +03:00
parent 823fc25fa8
commit e3e380124d
1 changed files with 4 additions and 2 deletions

View File

@ -108,9 +108,11 @@ bool TTLValidator::can() const {
&& !_peer->isNotificationsUser()
&& !_peer->asUser()->isInaccessible())
|| (_peer->isChat()
&& _peer->asChat()->canDeleteMessages())
&& _peer->asChat()->canDeleteMessages()
&& _peer->asChat()->amIn())
|| (_peer->isChannel()
&& _peer->asChannel()->canDeleteMessages());
&& _peer->asChannel()->canDeleteMessages()
&& _peer->asChannel()->amIn());
}
void TTLValidator::showToast() const {