mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
[WIP] Folders
This commit is contained in:
@@ -238,7 +238,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
||||
dict[594758406] = { return Api.EncryptedMessage.parse_encryptedMessageService($0) }
|
||||
dict[179611673] = { return Api.ExportedChatInvite.parse_chatInviteExported($0) }
|
||||
dict[-317687113] = { return Api.ExportedChatInvite.parse_chatInvitePublicJoinRequests($0) }
|
||||
dict[-1350894801] = { return Api.ExportedCommunityInvite.parse_exportedCommunityInvite($0) }
|
||||
dict[-337788502] = { return Api.ExportedCommunityInvite.parse_exportedCommunityInvite($0) }
|
||||
dict[1103040667] = { return Api.ExportedContactToken.parse_exportedContactToken($0) }
|
||||
dict[1571494644] = { return Api.ExportedMessageLink.parse_exportedMessageLink($0) }
|
||||
dict[-207944868] = { return Api.FileHash.parse_fileHash($0) }
|
||||
@@ -998,7 +998,7 @@ fileprivate let parsers: [Int32 : (BufferReader) -> Any?] = {
|
||||
dict[-191450938] = { return Api.channels.SendAsPeers.parse_sendAsPeers($0) }
|
||||
dict[1805101290] = { return Api.communities.ExportedCommunityInvite.parse_exportedCommunityInvite($0) }
|
||||
dict[-2662489] = { return Api.communities.ExportedInvites.parse_exportedInvites($0) }
|
||||
dict[408604768] = { return Api.community.CommunityInvite.parse_communityInvite($0) }
|
||||
dict[988463765] = { return Api.community.CommunityInvite.parse_communityInvite($0) }
|
||||
dict[74184410] = { return Api.community.CommunityInvite.parse_communityInviteAlready($0) }
|
||||
dict[182326673] = { return Api.contacts.Blocked.parse_blocked($0) }
|
||||
dict[-513392236] = { return Api.contacts.Blocked.parse_blockedSlice($0) }
|
||||
|
||||
@@ -958,15 +958,16 @@ public extension Api.communities {
|
||||
}
|
||||
public extension Api.community {
|
||||
enum CommunityInvite: TypeConstructorDescription {
|
||||
case communityInvite(peers: [Api.Peer], chats: [Api.Chat], users: [Api.User])
|
||||
case communityInvite(title: String, peers: [Api.Peer], chats: [Api.Chat], users: [Api.User])
|
||||
case communityInviteAlready(filterId: Int32, missingPeers: [Api.Peer], chats: [Api.Chat], users: [Api.User])
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .communityInvite(let peers, let chats, let users):
|
||||
case .communityInvite(let title, let peers, let chats, let users):
|
||||
if boxed {
|
||||
buffer.appendInt32(408604768)
|
||||
buffer.appendInt32(988463765)
|
||||
}
|
||||
serializeString(title, buffer: buffer, boxed: false)
|
||||
buffer.appendInt32(481674261)
|
||||
buffer.appendInt32(Int32(peers.count))
|
||||
for item in peers {
|
||||
@@ -1009,31 +1010,34 @@ public extension Api.community {
|
||||
|
||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||
switch self {
|
||||
case .communityInvite(let peers, let chats, let users):
|
||||
return ("communityInvite", [("peers", peers as Any), ("chats", chats as Any), ("users", users as Any)])
|
||||
case .communityInvite(let title, let peers, let chats, let users):
|
||||
return ("communityInvite", [("title", title as Any), ("peers", peers as Any), ("chats", chats as Any), ("users", users as Any)])
|
||||
case .communityInviteAlready(let filterId, let missingPeers, let chats, let users):
|
||||
return ("communityInviteAlready", [("filterId", filterId as Any), ("missingPeers", missingPeers as Any), ("chats", chats as Any), ("users", users as Any)])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_communityInvite(_ reader: BufferReader) -> CommunityInvite? {
|
||||
var _1: [Api.Peer]?
|
||||
var _1: String?
|
||||
_1 = parseString(reader)
|
||||
var _2: [Api.Peer]?
|
||||
if let _ = reader.readInt32() {
|
||||
_1 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self)
|
||||
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self)
|
||||
}
|
||||
var _2: [Api.Chat]?
|
||||
var _3: [Api.Chat]?
|
||||
if let _ = reader.readInt32() {
|
||||
_2 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
|
||||
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Chat.self)
|
||||
}
|
||||
var _3: [Api.User]?
|
||||
var _4: [Api.User]?
|
||||
if let _ = reader.readInt32() {
|
||||
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
|
||||
_4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.User.self)
|
||||
}
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
let _c3 = _3 != nil
|
||||
if _c1 && _c2 && _c3 {
|
||||
return Api.community.CommunityInvite.communityInvite(peers: _1!, chats: _2!, users: _3!)
|
||||
let _c4 = _4 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 {
|
||||
return Api.community.CommunityInvite.communityInvite(title: _1!, peers: _2!, chats: _3!, users: _4!)
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
|
||||
@@ -1026,14 +1026,15 @@ public extension Api {
|
||||
}
|
||||
public extension Api {
|
||||
enum ExportedCommunityInvite: TypeConstructorDescription {
|
||||
case exportedCommunityInvite(title: String, url: String, peers: [Api.Peer])
|
||||
case exportedCommunityInvite(flags: Int32, title: String, url: String, peers: [Api.Peer])
|
||||
|
||||
public func serialize(_ buffer: Buffer, _ boxed: Swift.Bool) {
|
||||
switch self {
|
||||
case .exportedCommunityInvite(let title, let url, let peers):
|
||||
case .exportedCommunityInvite(let flags, let title, let url, let peers):
|
||||
if boxed {
|
||||
buffer.appendInt32(-1350894801)
|
||||
buffer.appendInt32(-337788502)
|
||||
}
|
||||
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||
serializeString(title, buffer: buffer, boxed: false)
|
||||
serializeString(url, buffer: buffer, boxed: false)
|
||||
buffer.appendInt32(481674261)
|
||||
@@ -1047,25 +1048,28 @@ public extension Api {
|
||||
|
||||
public func descriptionFields() -> (String, [(String, Any)]) {
|
||||
switch self {
|
||||
case .exportedCommunityInvite(let title, let url, let peers):
|
||||
return ("exportedCommunityInvite", [("title", title as Any), ("url", url as Any), ("peers", peers as Any)])
|
||||
case .exportedCommunityInvite(let flags, let title, let url, let peers):
|
||||
return ("exportedCommunityInvite", [("flags", flags as Any), ("title", title as Any), ("url", url as Any), ("peers", peers as Any)])
|
||||
}
|
||||
}
|
||||
|
||||
public static func parse_exportedCommunityInvite(_ reader: BufferReader) -> ExportedCommunityInvite? {
|
||||
var _1: String?
|
||||
_1 = parseString(reader)
|
||||
var _1: Int32?
|
||||
_1 = reader.readInt32()
|
||||
var _2: String?
|
||||
_2 = parseString(reader)
|
||||
var _3: [Api.Peer]?
|
||||
var _3: String?
|
||||
_3 = parseString(reader)
|
||||
var _4: [Api.Peer]?
|
||||
if let _ = reader.readInt32() {
|
||||
_3 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self)
|
||||
_4 = Api.parseVector(reader, elementSignature: 0, elementType: Api.Peer.self)
|
||||
}
|
||||
let _c1 = _1 != nil
|
||||
let _c2 = _2 != nil
|
||||
let _c3 = _3 != nil
|
||||
if _c1 && _c2 && _c3 {
|
||||
return Api.ExportedCommunityInvite.exportedCommunityInvite(title: _1!, url: _2!, peers: _3!)
|
||||
let _c4 = _4 != nil
|
||||
if _c1 && _c2 && _c3 && _c4 {
|
||||
return Api.ExportedCommunityInvite.exportedCommunityInvite(flags: _1!, title: _2!, url: _3!, peers: _4!)
|
||||
}
|
||||
else {
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user