Various Fixes

This commit is contained in:
Ilya Laktyushin
2021-11-18 01:16:15 +04:00
parent ce43f3df69
commit c99a8ce024
10 changed files with 101 additions and 63 deletions

View File

@@ -153,6 +153,17 @@ public extension Peer {
return false
}
}
var isCopyProtectionEnabled: Bool {
switch self {
case let group as TelegramGroup:
return group.flags.contains(.copyProtectionEnabled)
case let channel as TelegramChannel:
return channel.flags.contains(.copyProtectionEnabled)
default:
return false
}
}
}
public extension PeerId {