Clear history allowed when delete channel allowed.

This commit is contained in:
John Preston 2022-06-20 12:04:56 +04:00
parent 69f469a0f9
commit 1c720af9bc
1 changed files with 3 additions and 1 deletions

View File

@ -903,7 +903,9 @@ bool PeerData::canRevokeFullHistory() const {
} else if (const auto chat = asChat()) {
return chat->amCreator();
} else if (const auto megagroup = asMegagroup()) {
return megagroup->amCreator();
return megagroup->amCreator()
&& megagroup->membersCountKnown()
&& megagroup->canDelete();
}
return false;
}