mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
Update API
This commit is contained in:
@@ -113,6 +113,7 @@ public struct Namespaces {
|
||||
public static let storySendAsPeerIds: Int8 = 29
|
||||
public static let cachedChannelBoosts: Int8 = 31
|
||||
public static let displayedMessageNotifications: Int8 = 32
|
||||
public static let recommendedChannels: Int8 = 33
|
||||
}
|
||||
|
||||
public struct UnorderedItemList {
|
||||
|
||||
@@ -111,6 +111,7 @@ public enum TelegramMediaActionType: PostboxCoding, Equatable {
|
||||
case setSameChatWallpaper(wallpaper: TelegramWallpaper)
|
||||
case giftCode(slug: String, fromGiveaway: Bool, isUnclaimed: Bool, boostPeerId: PeerId?, months: Int32)
|
||||
case giveawayLaunched
|
||||
case joinedChannel
|
||||
|
||||
public init(decoder: PostboxDecoder) {
|
||||
let rawValue: Int32 = decoder.decodeInt32ForKey("_rawValue", orElse: 0)
|
||||
@@ -209,6 +210,8 @@ public enum TelegramMediaActionType: PostboxCoding, Equatable {
|
||||
self = .giftCode(slug: decoder.decodeStringForKey("slug", orElse: ""), fromGiveaway: decoder.decodeBoolForKey("give", orElse: false), isUnclaimed: decoder.decodeBoolForKey("unclaimed", orElse: false), boostPeerId: PeerId(decoder.decodeInt64ForKey("pi", orElse: 0)), months: decoder.decodeInt32ForKey("months", orElse: 0))
|
||||
case 37:
|
||||
self = .giveawayLaunched
|
||||
case 38:
|
||||
self = .joinedChannel
|
||||
default:
|
||||
self = .unknown
|
||||
}
|
||||
@@ -401,6 +404,8 @@ public enum TelegramMediaActionType: PostboxCoding, Equatable {
|
||||
encoder.encodeInt32(months, forKey: "months")
|
||||
case .giveawayLaunched:
|
||||
encoder.encodeInt32(37, forKey: "_rawValue")
|
||||
case .joinedChannel:
|
||||
encoder.encodeInt32(38, forKey: "_rawValue")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user