mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-10-09 11:23:48 +00:00
Update API
This commit is contained in:
parent
38c0fd0bf2
commit
3fde9cf033
@ -2444,16 +2444,17 @@ public extension Api.functions.channels {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
public extension Api.functions.channels {
|
public extension Api.functions.channels {
|
||||||
static func reorderPinnedForumTopics(channel: Api.InputChannel, order: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Updates>) {
|
static func reorderPinnedForumTopics(flags: Int32, channel: Api.InputChannel, order: [Int32]) -> (FunctionDescription, Buffer, DeserializeFunctionResponse<Api.Updates>) {
|
||||||
let buffer = Buffer()
|
let buffer = Buffer()
|
||||||
buffer.appendInt32(-529811367)
|
buffer.appendInt32(693150095)
|
||||||
|
serializeInt32(flags, buffer: buffer, boxed: false)
|
||||||
channel.serialize(buffer, true)
|
channel.serialize(buffer, true)
|
||||||
buffer.appendInt32(481674261)
|
buffer.appendInt32(481674261)
|
||||||
buffer.appendInt32(Int32(order.count))
|
buffer.appendInt32(Int32(order.count))
|
||||||
for item in order {
|
for item in order {
|
||||||
serializeInt32(item, buffer: buffer, boxed: false)
|
serializeInt32(item, buffer: buffer, boxed: false)
|
||||||
}
|
}
|
||||||
return (FunctionDescription(name: "channels.reorderPinnedForumTopics", parameters: [("channel", String(describing: channel)), ("order", String(describing: order))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in
|
return (FunctionDescription(name: "channels.reorderPinnedForumTopics", parameters: [("flags", String(describing: flags)), ("channel", String(describing: channel)), ("order", String(describing: order))]), buffer, DeserializeFunctionResponse { (buffer: Buffer) -> Api.Updates? in
|
||||||
let reader = BufferReader(buffer)
|
let reader = BufferReader(buffer)
|
||||||
var result: Api.Updates?
|
var result: Api.Updates?
|
||||||
if let signature = reader.readInt32() {
|
if let signature = reader.readInt32() {
|
||||||
|
@ -386,13 +386,8 @@ func _internal_setForumChannelPinnedTopics(account: Account, id: EnginePeer.Id,
|
|||||||
return .fail(.generic)
|
return .fail(.generic)
|
||||||
}
|
}
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
if "".isEmpty {
|
|
||||||
return .complete()
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
return account.network.request(Api.functions.channels.reorderPinnedForumTopics(
|
return account.network.request(Api.functions.channels.reorderPinnedForumTopics(
|
||||||
|
flags: 1 << 0,
|
||||||
channel: inputChannel,
|
channel: inputChannel,
|
||||||
order: threadIds.map(Int32.init(clamping:))
|
order: threadIds.map(Int32.init(clamping:))
|
||||||
))
|
))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user