Merge commit 'b18b69a10f4729982db1264789ed33680fa8a422'

This commit is contained in:
Peter Iakovlev 2018-01-12 15:45:45 +04:00
commit 15be8bb5e6

View File

@ -401,6 +401,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
dict[-1938715001] = { return Api.messages.Messages.parse_messages($0) }
dict[189033187] = { return Api.messages.Messages.parse_messagesSlice($0) }
dict[-1725551049] = { return Api.messages.Messages.parse_channelMessages($0) }
dict[1951620897] = { return Api.messages.Messages.parse_messagesNotModified($0) }
dict[-1022713000] = { return Api.Invoice.parse_invoice($0) }
dict[-2122045747] = { return Api.PeerSettings.parse_peerSettings($0) }
dict[1577067778] = { return Api.auth.SentCode.parse_sentCode($0) }
@ -1886,6 +1887,7 @@ public struct Api {
case messages(messages: [Api.Message], chats: [Api.Chat], users: [Api.User])
case messagesSlice(count: Int32, messages: [Api.Message], chats: [Api.Chat], users: [Api.User])
case channelMessages(flags: Int32, pts: Int32, count: Int32, messages: [Api.Message], chats: [Api.Chat], users: [Api.User])
case messagesNotModified(count: Int32)
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
switch self {
@ -1953,6 +1955,12 @@ public struct Api {
item.serialize(buffer, true)
}
break
case .messagesNotModified(let count):
if boxed {
buffer.appendInt32(1951620897)
}
serializeInt32(count, buffer: buffer, boxed: false)
break
}
}
@ -2037,6 +2045,17 @@ public struct Api {
return nil
}
}
fileprivate static func parse_messagesNotModified(_ reader: BufferReader) -> Messages? {
var _1: Int32?
_1 = reader.readInt32()
let _c1 = _1 != nil
if _c1 {
return Api.messages.Messages.messagesNotModified(count: _1!)
}
else {
return nil
}
}
}