mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 14:45:21 +00:00
Message statistics
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
|
||||
public class ForwardCountMessageAttribute: MessageAttribute {
|
||||
public let count: Int
|
||||
|
||||
public var associatedMessageIds: [MessageId] = []
|
||||
|
||||
public init(count: Int) {
|
||||
self.count = count
|
||||
}
|
||||
|
||||
required public init(decoder: PostboxDecoder) {
|
||||
self.count = Int(decoder.decodeInt32ForKey("c", orElse: 0))
|
||||
}
|
||||
|
||||
public func encode(_ encoder: PostboxEncoder) {
|
||||
encoder.encodeInt32(Int32(self.count), forKey: "c")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user