Message statistics

This commit is contained in:
Ilya Laktyushin
2020-07-25 00:51:33 +03:00
parent e28ec6b7ca
commit c67feac3ce
28 changed files with 5430 additions and 4393 deletions

View File

@@ -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")
}
}