Update API

This commit is contained in:
Peter
2019-08-25 17:32:21 +04:00
parent 9b7bbc5ae7
commit f48ff32091
15 changed files with 425 additions and 129 deletions

View File

@@ -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
}
}