You can create a query to retrieve a list of muted users in both open and group channels. Only users registered as channel operators may use the following code.
class CustomViewController: ViewController { var channel: OpenChannel? var query: MutedUserListQuery? func createQuery() { // Retrieve muted users. self.query = channel?.createMutedUserListQuery() } func loadNextPage() { self.query?.loadNextPage { (users, error) in guard error == nil else { // Handle error. return } } } }
class CustomViewController: ViewController { var channel: GroupChannel? var query: MutedUserListQuery? func createQuery() { // Retrieve muted users. self.query = channel?.createMutedUserListQuery() } func loadNextPage() { self.query?.loadNextPage { users, error in guard error == nil else { // Handle error. return } // A list of muted members is successfully retrieved. } } }