mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
20 lines
478 B
Swift
20 lines
478 B
Swift
import Foundation
|
|
import Postbox
|
|
|
|
public class PeerGroupMessageStateVersionAttribute: MessageAttribute {
|
|
public let stateIndex: Int32
|
|
|
|
public init(stateIndex: Int32) {
|
|
self.stateIndex = stateIndex
|
|
}
|
|
|
|
required public init(decoder: PostboxDecoder) {
|
|
self.stateIndex = decoder.decodeInt32ForKey("p", orElse: 0)
|
|
}
|
|
|
|
public func encode(_ encoder: PostboxEncoder) {
|
|
encoder.encodeInt32(self.stateIndex, forKey: "p")
|
|
}
|
|
}
|
|
|