Swiftgram/TelegramCore/ChannelMessageStateVersionAttribute.swift
2017-08-29 17:20:33 +03:00

23 lines
486 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: PostboxDecoder) {
self.pts = decoder.decodeInt32ForKey("p", orElse: 0)
}
public func encode(_ encoder: PostboxEncoder) {
encoder.encodeInt32(self.pts, forKey: "p")
}
}