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:
@@ -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();
|
||||
}
|
||||
|
Reference in New Issue
Block a user