mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
18 lines
500 B
Swift
18 lines
500 B
Swift
import Foundation
|
|
import Postbox
|
|
import TelegramApi
|
|
|
|
|
|
extension TelegramChatBannedRights {
|
|
init(apiBannedRights: Api.ChatBannedRights) {
|
|
switch apiBannedRights {
|
|
case let .chatBannedRights(flags, untilDate):
|
|
self.init(flags: TelegramChatBannedRightsFlags(rawValue: flags), untilDate: untilDate)
|
|
}
|
|
}
|
|
|
|
var apiBannedRights: Api.ChatBannedRights {
|
|
return .chatBannedRights(flags: self.flags.rawValue, untilDate: self.untilDate)
|
|
}
|
|
}
|