mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
22 lines
548 B
Swift
22 lines
548 B
Swift
import Foundation
|
|
#if os(macOS)
|
|
import PostboxMac
|
|
import TelegramApiMac
|
|
#else
|
|
import Postbox
|
|
import TelegramApi
|
|
#endif
|
|
|
|
import SyncCore
|
|
|
|
extension SecretChatFileReference {
|
|
convenience init?(_ file: Api.EncryptedFile) {
|
|
switch file {
|
|
case let .encryptedFile(id, accessHash, size, dcId, keyFingerprint):
|
|
self.init(id: id, accessHash: accessHash, size: size, datacenterId: dcId, keyFingerprint: keyFingerprint)
|
|
case .encryptedFileEmpty:
|
|
return nil
|
|
}
|
|
}
|
|
}
|