mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-08-17 11:00:07 +00:00
23 lines
479 B
Swift
23 lines
479 B
Swift
import Foundation
|
|
import Postbox
|
|
|
|
class InlineBotMessageAttribute: MessageAttribute {
|
|
let peerId: PeerId
|
|
|
|
var associatedPeerIds: [PeerId] {
|
|
return [self.peerId]
|
|
}
|
|
|
|
init(peerId: PeerId) {
|
|
self.peerId = peerId
|
|
}
|
|
|
|
required init(decoder: Decoder) {
|
|
self.peerId = PeerId(decoder.decodeInt64ForKey("i"))
|
|
}
|
|
|
|
func encode(_ encoder: Encoder) {
|
|
encoder.encodeInt64(self.peerId.toInt64(), forKey: "i")
|
|
}
|
|
}
|