Swiftgram/TelegramCore/ChannelMessageStateVersionAttribute.swift
2017-06-13 21:45:17 +03:00

23 lines
472 B
Swift

import Foundation
#if os(macOS)
import PostboxMac
#else
import Postbox
#endif
public class ChannelMessageStateVersionAttribute: MessageAttribute {
public let pts: Int32
public init(pts: Int32) {
self.pts = pts
}
required public init(decoder: Decoder) {
self.pts = decoder.decodeInt32ForKey("p", orElse: 0)
}
public func encode(_ encoder: Encoder) {
encoder.encodeInt32(self.pts, forKey: "p")
}
}