Support multiple pinned threads

This commit is contained in:
Ali
2022-11-04 19:15:25 +04:00
parent f1864a43b9
commit fa95906962
5 changed files with 165 additions and 63 deletions

View File

@@ -878,6 +878,12 @@ public extension TelegramEngine {
}
}
public func getForumChannelPinnedTopics(id: EnginePeer.Id) -> Signal<[Int64], NoError> {
return self.account.postbox.transaction { transcation -> [Int64] in
return transcation.getPeerPinnedThreads(peerId: id)
}
}
public func setForumChannelPinnedTopics(id: EnginePeer.Id, threadIds: [Int64]) -> Signal<Never, SetForumChannelTopicPinnedError> {
return _internal_setForumChannelPinnedTopics(account: self.account, id: id, threadIds: threadIds)
}