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.
classCustomViewController:ViewController{var query:BlockedUserListQuery?// ...funccreateQuery(){// Retrieve all blocked users.self.query =SendbirdChat.createBlockedUserListQuery()}funcloadNextPage(){self.query?.loadNextPage { users, error inguard error ==nilelse{// 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.}}}
classCustomViewController:ViewController{var query:BlockedUserListQuery?// ...funccreateQuery(){// Retrieve specific blocked users using userIdsFilter.self.query =SendbirdChat.createBlockedUserListQuery { params in//params is the BlockedUserListQueryParams object.
params.userIdsFilter =["John","Daniel","Jeff"]}}funcloadNextPage(){self.query?.loadNextPage { users, error inguard error ==nilelse{// Handle error.return}// A list of matching users is successfully retrieved.}}}