2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Edit pre-history visibility in megagroups.

This commit is contained in:
John Preston
2017-11-22 12:04:45 +04:00
parent 2387b66e86
commit 542ba89f25
5 changed files with 167 additions and 12 deletions

View File

@@ -983,6 +983,10 @@ bool ChannelData::anyoneCanAddMembers() const {
return (flags() & MTPDchannel::Flag::f_democracy);
}
bool ChannelData::hiddenPreHistory() const {
return (fullFlags() & MTPDchannelFull::Flag::f_hidden_prehistory);
}
bool ChannelData::canAddMembers() const {
return (adminRights() & AdminRight::f_invite_users)
|| amCreator()
@@ -1036,6 +1040,18 @@ bool ChannelData::canEditInformation() const {
|| amCreator();
}
bool ChannelData::canEditInvites() const {
return canEditInformation();
}
bool ChannelData::canEditSignatures() const {
return canEditInformation();
}
bool ChannelData::canEditPreHistoryHidden() const {
return canEditInformation();
}
bool ChannelData::canEditUsername() const {
return amCreator()
&& (fullFlags()