Update API

This commit is contained in:
Ali
2023-03-31 12:41:42 +04:00
parent bffc9534e4
commit 1af97f27fc
12 changed files with 108 additions and 21 deletions

View File

@@ -686,3 +686,13 @@ func _internal_leaveChatFolder(account: Account, folderId: Int32, removePeerIds:
}
}
}
func _internal_requestLeaveChatFolderSuggestions(account: Account, folderId: Int32) -> Signal<[EnginePeer.Id], NoError> {
return account.network.request(Api.functions.communities.getLeaveCommunitySuggestions(community: .inputCommunityDialogFilter(filterId: folderId)))
|> map { result -> [EnginePeer.Id] in
return result.map(\.peerId)
}
|> `catch` { _ -> Signal<[EnginePeer.Id], NoError> in
return .single([])
}
}