mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
17 lines
492 B
Swift
17 lines
492 B
Swift
import Foundation
|
|
import TelegramCore
|
|
import SyncCore
|
|
|
|
public extension RestrictedContentMessageAttribute {
|
|
func platformText(platform: String, contentSettings: ContentSettings) -> String? {
|
|
for rule in self.rules {
|
|
if rule.platform == "all" || rule.platform == "ios" {
|
|
if !contentSettings.ignoreContentRestrictionReasons.contains(rule.reason) {
|
|
return rule.text
|
|
}
|
|
}
|
|
}
|
|
return nil
|
|
}
|
|
}
|