2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-02 07:25:46 +00:00

Support separate message type group restrictions.

This commit is contained in:
John Preston
2023-01-10 22:56:20 +04:00
parent de5bbf2cb9
commit 554f66f089
64 changed files with 1437 additions and 832 deletions

View File

@@ -63,11 +63,6 @@ ChatAdminRightsInfo ChatData::defaultAdminRights(not_null<UserData*> user) {
| (isCreator ? Flag::AddAdmins : Flag(0)));
}
bool ChatData::canWrite() const {
// Duplicated in Data::CanWriteValue().
return amIn() && !amRestricted(ChatRestriction::SendMessages);
}
bool ChatData::allowsForwarding() const {
return !(flags() & Flag::NoForwards);
}
@@ -99,10 +94,6 @@ bool ChatData::canAddMembers() const {
return amIn() && !amRestricted(ChatRestriction::AddParticipants);
}
bool ChatData::canSendPolls() const {
return amIn() && !amRestricted(ChatRestriction::SendPolls);
}
bool ChatData::canAddAdmins() const {
return amIn() && amCreator();
}