mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Refactor SyncCore
This commit is contained in:
21
submodules/SyncCore/Sources/ExportedInvitation.swift
Normal file
21
submodules/SyncCore/Sources/ExportedInvitation.swift
Normal file
@@ -0,0 +1,21 @@
|
||||
import Postbox
|
||||
|
||||
public struct ExportedInvitation: PostboxCoding, Equatable {
|
||||
public let link: String
|
||||
|
||||
public init(link: String) {
|
||||
self.link = link
|
||||
}
|
||||
|
||||
public init(decoder: PostboxDecoder) {
|
||||
self.link = decoder.decodeStringForKey("l", orElse: "")
|
||||
}
|
||||
|
||||
public func encode(_ encoder: PostboxEncoder) {
|
||||
encoder.encodeString(self.link, forKey: "l")
|
||||
}
|
||||
|
||||
public static func ==(lhs: ExportedInvitation, rhs: ExportedInvitation) -> Bool {
|
||||
return lhs.link == rhs.link
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user