mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-17 03:40:18 +00:00
API update
This commit is contained in:
parent
11b1196290
commit
65407c91f9
@ -523,7 +523,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
|||||||
dict[-402498398] = { return Api.messages.SavedGifs.parse_savedGifsNotModified($0) }
|
dict[-402498398] = { return Api.messages.SavedGifs.parse_savedGifsNotModified($0) }
|
||||||
dict[772213157] = { return Api.messages.SavedGifs.parse_savedGifs($0) }
|
dict[772213157] = { return Api.messages.SavedGifs.parse_savedGifs($0) }
|
||||||
dict[-914167110] = { return Api.CdnPublicKey.parse_cdnPublicKey($0) }
|
dict[-914167110] = { return Api.CdnPublicKey.parse_cdnPublicKey($0) }
|
||||||
dict[1081274310] = { return Api.MessageReplies.parse_messageReplies($0) }
|
dict[1093204652] = { return Api.MessageReplies.parse_messageReplies($0) }
|
||||||
dict[53231223] = { return Api.InputGame.parse_inputGameID($0) }
|
dict[53231223] = { return Api.InputGame.parse_inputGameID($0) }
|
||||||
dict[-1020139510] = { return Api.InputGame.parse_inputGameShortName($0) }
|
dict[-1020139510] = { return Api.InputGame.parse_inputGameShortName($0) }
|
||||||
dict[1107543535] = { return Api.help.CountryCode.parse_countryCode($0) }
|
dict[1107543535] = { return Api.help.CountryCode.parse_countryCode($0) }
|
||||||
|
|||||||
@ -15196,13 +15196,13 @@ public extension Api {
|
|||||||
|
|
||||||
}
|
}
|
||||||
public enum MessageReplies: TypeConstructorDescription {
|
public enum MessageReplies: TypeConstructorDescription {
|
||||||
case messageReplies(flags: Int32, replies: Int32, repliesPts: Int32, recentRepliers: [Api.Peer]?, channelId: Int32?)
|
case messageReplies(flags: Int32, replies: Int32, repliesPts: Int32, recentRepliers: [Api.Peer]?, channelId: Int32?, maxId: Int32?, readMaxId: Int32?)
|
||||||
|
|
||||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||||
switch self {
|
switch self {
|
||||||
case .messageReplies(let flags, let replies, let repliesPts, let recentRepliers, let channelId):
|
case .messageReplies(let flags, let replies, let repliesPts, let recentRepliers, let channelId, let maxId, let readMaxId):
|
||||||
if boxed {
|
if boxed {
|
||||||
buffer.appendInt32(1081274310)
|
buffer.appendInt32(1093204652)
|
||||||
}
|
}
|
||||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||||
serializeInt32(replies, buffer: buffer, boxed: false)
|
serializeInt32(replies, buffer: buffer, boxed: false)
|
||||||
@ -15213,14 +15213,16 @@ public extension Api {
|
|||||||
item.serialize(buffer, true)
|
item.serialize(buffer, true)
|
||||||
}}
|
}}
|
||||||
if Int(flags) & Int(1 << 0) != 0 {serializeInt32(channelId!, buffer: buffer, boxed: false)}
|
if Int(flags) & Int(1 << 0) != 0 {serializeInt32(channelId!, buffer: buffer, boxed: false)}
|
||||||
|
if Int(flags) & Int(1 << 2) != 0 {serializeInt32(maxId!, buffer: buffer, boxed: false)}
|
||||||
|
if Int(flags) & Int(1 << 3) != 0 {serializeInt32(readMaxId!, buffer: buffer, boxed: false)}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||||
switch self {
|
switch self {
|
||||||
case .messageReplies(let flags, let replies, let repliesPts, let recentRepliers, let channelId):
|
case .messageReplies(let flags, let replies, let repliesPts, let recentRepliers, let channelId, let maxId, let readMaxId):
|
||||||
return ("messageReplies", [("flags", flags), ("replies", replies), ("repliesPts", repliesPts), ("recentRepliers", recentRepliers), ("channelId", channelId)])
|
return ("messageReplies", [("flags", flags), ("replies", replies), ("repliesPts", repliesPts), ("recentRepliers", recentRepliers), ("channelId", channelId), ("maxId", maxId), ("readMaxId", readMaxId)])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -15237,13 +15239,19 @@ public extension Api {
|
|||||||
} }
|
} }
|
||||||
var _5: Int32?
|
var _5: Int32?
|
||||||
if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() }
|
if Int(_1!) & Int(1 << 0) != 0 {_5 = reader.readInt32() }
|
||||||
|
var _6: Int32?
|
||||||
|
if Int(_1!) & Int(1 << 2) != 0 {_6 = reader.readInt32() }
|
||||||
|
var _7: Int32?
|
||||||
|
if Int(_1!) & Int(1 << 3) != 0 {_7 = reader.readInt32() }
|
||||||
let _c1 = _1 != nil
|
let _c1 = _1 != nil
|
||||||
let _c2 = _2 != nil
|
let _c2 = _2 != nil
|
||||||
let _c3 = _3 != nil
|
let _c3 = _3 != nil
|
||||||
let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil
|
let _c4 = (Int(_1!) & Int(1 << 1) == 0) || _4 != nil
|
||||||
let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil
|
let _c5 = (Int(_1!) & Int(1 << 0) == 0) || _5 != nil
|
||||||
if _c1 && _c2 && _c3 && _c4 && _c5 {
|
let _c6 = (Int(_1!) & Int(1 << 2) == 0) || _6 != nil
|
||||||
return Api.MessageReplies.messageReplies(flags: _1!, replies: _2!, repliesPts: _3!, recentRepliers: _4, channelId: _5)
|
let _c7 = (Int(_1!) & Int(1 << 3) == 0) || _7 != nil
|
||||||
|
if _c1 && _c2 && _c3 && _c4 && _c5 && _c6 && _c7 {
|
||||||
|
return Api.MessageReplies.messageReplies(flags: _1!, replies: _2!, repliesPts: _3!, recentRepliers: _4, channelId: _5, maxId: _6, readMaxId: _7)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
return nil
|
return nil
|
||||||
|
|||||||
@ -618,7 +618,7 @@ public final class AccountViewTracker {
|
|||||||
var repliesCount: Int32?
|
var repliesCount: Int32?
|
||||||
if let replies = replies {
|
if let replies = replies {
|
||||||
switch replies {
|
switch replies {
|
||||||
case let .messageReplies(_, repliesCountValue, _, recentRepliers, channelId):
|
case let .messageReplies(_, repliesCountValue, _, recentRepliers, channelId, _, _):
|
||||||
if let channelId = channelId {
|
if let channelId = channelId {
|
||||||
commentsChannelId = PeerId(namespace: Namespaces.Peer.CloudChannel, id: channelId)
|
commentsChannelId = PeerId(namespace: Namespaces.Peer.CloudChannel, id: channelId)
|
||||||
}
|
}
|
||||||
|
|||||||
@ -530,9 +530,8 @@ extension StoreMessage {
|
|||||||
|
|
||||||
if let replies = replies {
|
if let replies = replies {
|
||||||
let recentRepliersPeerIds: [PeerId]?
|
let recentRepliersPeerIds: [PeerId]?
|
||||||
//messageReplies flags:# comments:flags.0?true replies:int replies_pts:int recent_repliers:flags.1?Vector<int> channel_id:flags.0?int top_msg_id:flags.2?int = MessageReplies;
|
|
||||||
switch replies {
|
switch replies {
|
||||||
case let .messageReplies(_, repliesCount, _, recentRepliers, channelId):
|
case let .messageReplies(_, repliesCount, _, recentRepliers, channelId, _, _):
|
||||||
if let recentRepliers = recentRepliers {
|
if let recentRepliers = recentRepliers {
|
||||||
recentRepliersPeerIds = recentRepliers.map { $0.peerId }
|
recentRepliersPeerIds = recentRepliers.map { $0.peerId }
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user