mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-16 18:40:05 +00:00
27 lines
667 B
Swift
27 lines
667 B
Swift
import Foundation
|
|
#if os(macOS)
|
|
import PostboxMac
|
|
#else
|
|
import Postbox
|
|
#endif
|
|
|
|
public class OutgoingChatContextResultMessageAttribute: MessageAttribute {
|
|
public let queryId: Int64
|
|
public let id: String
|
|
|
|
init(queryId: Int64, id: String) {
|
|
self.queryId = queryId
|
|
self.id = id
|
|
}
|
|
|
|
required public init(decoder: Decoder) {
|
|
self.queryId = decoder.decodeInt64ForKey("q", orElse: 0)
|
|
self.id = decoder.decodeStringForKey("i", orElse: "")
|
|
}
|
|
|
|
public func encode(_ encoder: Encoder) {
|
|
encoder.encodeInt64(self.queryId, forKey: "q")
|
|
encoder.encodeString(self.id, forKey: "i")
|
|
}
|
|
}
|