mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 22:55:00 +00:00
Comments update
This commit is contained in:
@@ -18,6 +18,13 @@ public enum TelegramChannelPermission {
|
||||
public extension TelegramChannel {
|
||||
func hasPermission(_ permission: TelegramChannelPermission) -> Bool {
|
||||
if self.flags.contains(.isCreator) {
|
||||
if case .canBeAnonymous = permission {
|
||||
if let adminRights = self.adminRights {
|
||||
return adminRights.flags.contains(.canBeAnonymous)
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
return true
|
||||
}
|
||||
switch permission {
|
||||
|
||||
Reference in New Issue
Block a user