mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Web app improvements
This commit is contained in:
@@ -91,7 +91,7 @@ public enum TelegramMediaActionType: PostboxCoding, Equatable {
|
||||
case paymentSent(currency: String, totalAmount: Int64, invoiceSlug: String?, isRecurringInit: Bool, isRecurringUsed: Bool)
|
||||
case customText(text: String, entities: [MessageTextEntity])
|
||||
case botDomainAccessGranted(domain: String)
|
||||
case botAppAccessGranted(appName: String, type: BotSendMessageAccessGrantedType?)
|
||||
case botAppAccessGranted(appName: String?, type: BotSendMessageAccessGrantedType?)
|
||||
case botSentSecureValues(types: [SentSecureValueType])
|
||||
case peerJoined
|
||||
case phoneNumberRequest
|
||||
@@ -202,7 +202,7 @@ public enum TelegramMediaActionType: PostboxCoding, Equatable {
|
||||
self = .unknown
|
||||
}
|
||||
case 35:
|
||||
self = .botAppAccessGranted(appName: decoder.decodeStringForKey("app", orElse: ""), type: decoder.decodeOptionalInt32ForKey("atp").flatMap { BotSendMessageAccessGrantedType(rawValue: $0) })
|
||||
self = .botAppAccessGranted(appName: decoder.decodeOptionalStringForKey("app"), type: decoder.decodeOptionalInt32ForKey("atp").flatMap { BotSendMessageAccessGrantedType(rawValue: $0) })
|
||||
default:
|
||||
self = .unknown
|
||||
}
|
||||
@@ -372,7 +372,11 @@ public enum TelegramMediaActionType: PostboxCoding, Equatable {
|
||||
encoder.encode(TelegramWallpaperNativeCodable(wallpaper), forKey: "wallpaper")
|
||||
case let .botAppAccessGranted(appName, type):
|
||||
encoder.encodeInt32(35, forKey: "_rawValue")
|
||||
encoder.encodeString(appName, forKey: "app")
|
||||
if let appName = appName {
|
||||
encoder.encodeString(appName, forKey: "app")
|
||||
} else {
|
||||
encoder.encodeNil(forKey: "app")
|
||||
}
|
||||
if let type = type {
|
||||
encoder.encodeInt32(type.rawValue, forKey: "atp")
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user