mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
Update API
This commit is contained in:
@@ -2,7 +2,12 @@ import Foundation
|
||||
import TelegramCore
|
||||
|
||||
public extension RestrictedContentMessageAttribute {
|
||||
func matchesPlatform() -> Bool {
|
||||
return self.platformSelector == "ios"
|
||||
func platformText(platform: String) -> String? {
|
||||
for rule in self.rules {
|
||||
if rule.platform == "all" || rule.platform == "ios" {
|
||||
return rule.text
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user