mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
19 lines
447 B
Swift
19 lines
447 B
Swift
import Foundation
|
|
import Postbox
|
|
import TelegramApi
|
|
|
|
import SyncCore
|
|
|
|
extension TelegramChatAdminRights {
|
|
init(apiAdminRights: Api.ChatAdminRights) {
|
|
switch apiAdminRights {
|
|
case let .chatAdminRights(flags):
|
|
self.init(flags: TelegramChatAdminRightsFlags(rawValue: flags))
|
|
}
|
|
}
|
|
|
|
var apiAdminRights: Api.ChatAdminRights {
|
|
return .chatAdminRights(flags: self.flags.rawValue)
|
|
}
|
|
}
|