mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Implement forward and copy restriction
This commit is contained in:
@@ -238,6 +238,14 @@ public extension Message {
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
||||
func isCopyProtected() -> Bool {
|
||||
if let channel = self.peers[self.id.peerId] as? TelegramChannel, case let .broadcast(flags) = channel.info, flags.flags.contains(.copyProtectionEnabled) && channel.adminRights == nil {
|
||||
return true
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public extension Message {
|
||||
|
||||
Reference in New Issue
Block a user