mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
22 lines
456 B
Swift
22 lines
456 B
Swift
import Foundation
|
|
#if os(macOS)
|
|
import PostboxMac
|
|
import TelegramApiMac
|
|
#else
|
|
import Postbox
|
|
import TelegramApi
|
|
#endif
|
|
|
|
import SyncCore
|
|
|
|
extension ExportedInvitation {
|
|
init?(apiExportedInvite: Api.ExportedChatInvite) {
|
|
switch apiExportedInvite {
|
|
case .chatInviteEmpty:
|
|
return nil
|
|
case let .chatInviteExported(link):
|
|
self = ExportedInvitation(link: link)
|
|
}
|
|
}
|
|
}
|