Fix pre-history visibility rights check.

This commit is contained in:
John Preston 2019-03-20 13:22:58 +04:00
parent be53cb027c
commit 8acd47bf2f
1 changed files with 3 additions and 3 deletions

View File

@ -394,12 +394,12 @@ bool ChannelData::canEditPermissions() const {
}
bool ChannelData::canEditSignatures() const {
return canEditInformation();
return isChannel() && canEditInformation();
}
bool ChannelData::canEditPreHistoryHidden() const {
return canEditInformation()
&& isMegagroup()
return isMegagroup()
&& ((adminRights() & AdminRight::f_ban_users) || amCreator())
&& (!isPublic() || canEditUsername());
}