mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-22 14:20:20 +00:00
[WIP] Chat Import
This commit is contained in:
@@ -460,7 +460,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
||||
dict[649453030] = { return Api.messages.MessageEditData.parse_messageEditData($0) }
|
||||
dict[-886477832] = { return Api.LabeledPrice.parse_labeledPrice($0) }
|
||||
dict[-438840932] = { return Api.messages.ChatFull.parse_chatFull($0) }
|
||||
dict[-1919636670] = { return Api.messages.HistoryImportParsed.parse_historyImportParsed($0) }
|
||||
dict[1578088377] = { return Api.messages.HistoryImportParsed.parse_historyImportParsed($0) }
|
||||
dict[-618540889] = { return Api.InputSecureValue.parse_inputSecureValue($0) }
|
||||
dict[-170029155] = { return Api.messages.DiscussionMessage.parse_discussionMessage($0) }
|
||||
dict[1722786150] = { return Api.help.DeepLinkInfo.parse_deepLinkInfoEmpty($0) }
|
||||
|
||||
@@ -985,10 +985,10 @@ public struct messages {
|
||||
switch self {
|
||||
case .historyImportParsed(let flags, let title):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1919636670)
|
||||
buffer.appendInt32(1578088377)
|
||||
}
|
||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||
if Int(flags) & Int(1 << 1) != 0 {serializeString(title!, buffer: buffer, boxed: false)}
|
||||
if Int(flags) & Int(1 << 2) != 0 {serializeString(title!, buffer: buffer, boxed: false)}
|
||||
break
|
||||
}
|
||||
}
|
||||
@@ -1004,9 +1004,9 @@ public struct messages {
|
||||
var _1: Int32?
|
||||
_1 = reader.readInt32()
|
||||
var _2: String?
|
||||
if Int(_1!) & Int(1 << 1) != 0 {_2 = parseString(reader) }
|
||||
if Int(_1!) & Int(1 << 2) != 0 {_2 = parseString(reader) }
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = (Int(_1!) & Int(1 << 1) == 0) || _2 != nil
|
||||
let _c2 = (Int(_1!) & Int(1 << 2) == 0) || _2 != nil
|
||||
if _c1 && _c2 {
|
||||
return Api.messages.HistoryImportParsed.historyImportParsed(flags: _1!, title: _2)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user