By using the BlockedUserListQuery's loadNextPage(completionHandler:) method, you can retrieve a list of all or specific blocked users in your Sendbird application. The method returns a list of User objects that contain information about the blocked users.
class CustomViewController: ViewController {
var query: BlockedUserListQuery?
// ...
func createQuery() {
// Retrieve all blocked users.
self.query = SendbirdChat.createBlockedUserListQuery()
}
func loadNextPage() {
self.query?.loadNextPage { users, error in
guard error == nil else {
// Handle error.
return
}
// A list of blocked users is successfully retrieved.
// Through the users parameter of the callback method,
// you can access the data of each blocked user
// from the result list that the Sendbird server has passed
// to the callback method.
}
}
}