mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 22:25:57 +00:00
[WIP] Quick replies
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import Foundation
|
||||
import Postbox
|
||||
import TelegramApi
|
||||
|
||||
public final class OutgoingQuickReplyMessageAttribute: Equatable, MessageAttribute {
|
||||
public let shortcut: String
|
||||
|
||||
public init(shortcut: String) {
|
||||
self.shortcut = shortcut
|
||||
}
|
||||
|
||||
required public init(decoder: PostboxDecoder) {
|
||||
self.shortcut = decoder.decodeStringForKey("s", orElse: "")
|
||||
}
|
||||
|
||||
public func encode(_ encoder: PostboxEncoder) {
|
||||
encoder.encodeString(self.shortcut, forKey: "s")
|
||||
}
|
||||
|
||||
public static func ==(lhs: OutgoingQuickReplyMessageAttribute, rhs: OutgoingQuickReplyMessageAttribute) -> Bool {
|
||||
return true
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user