2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Add manage_call admin right support.

This commit is contained in:
John Preston
2020-11-28 10:21:11 +03:00
parent d18b29efb8
commit 7983d33ad5
10 changed files with 24 additions and 8 deletions

View File

@@ -523,6 +523,10 @@ bool ChannelData::canRestrictUser(not_null<UserData*> user) const {
return adminRights() & AdminRight::f_ban_users;
}
bool ChannelData::canManageCall() const {
return amCreator() || (adminRights() & AdminRight::f_manage_call);
}
void ChannelData::setAdminRights(const MTPChatAdminRights &rights) {
if (rights.c_chatAdminRights().vflags().v == adminRights()) {
return;