mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Comments update
This commit is contained in:
@@ -3,16 +3,24 @@ import Postbox
|
||||
|
||||
public class ReplyThreadMessageAttribute: MessageAttribute {
|
||||
public let count: Int32
|
||||
public let latestUsers: [PeerId]
|
||||
|
||||
public init(count: Int32) {
|
||||
public var associatedPeerIds: [PeerId] {
|
||||
return self.latestUsers
|
||||
}
|
||||
|
||||
public init(count: Int32, latestUsers: [PeerId]) {
|
||||
self.count = count
|
||||
self.latestUsers = latestUsers
|
||||
}
|
||||
|
||||
required public init(decoder: PostboxDecoder) {
|
||||
self.count = decoder.decodeInt32ForKey("c", orElse: 0)
|
||||
self.latestUsers = decoder.decodeInt64ArrayForKey("u").map(PeerId.init)
|
||||
}
|
||||
|
||||
public func encode(_ encoder: PostboxEncoder) {
|
||||
encoder.encodeInt32(self.count, forKey: "c")
|
||||
encoder.encodeInt64Array(self.latestUsers.map { $0.toInt64() }, forKey: "u")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user