You can retrieve a list of OpenChannel
objects using the loadNextPage(completionHandler:)
method of an OpenChannelListQuery
instance and a list of GroupChannel
objects using the loadNextPage(completionHandler:)
method of a GroupChannelListQuery
instance.
Creating a GroupChannelListQuery
instance returns a list of the user's private group channels. A different approach is needed to retrieve a list of public group channels and Supergroup channels as described later in this page.
When creating a GroupChannelListQuery
instance, the includeEmptyChannel
option of GroupChannelListQueryParams
is set to true
by default to allow users to view channels that may be empty because the chat history option is turned off and prevents new members from seeing previous conversations. You can determine whether to turn on the chat history option on Sendbird Dashboard
Note: You can also search for specific open channels and group channels with keywords and filters.
You can retrieve a list of the current user's public group channels using the loadNextPage(completionHandler:)
method of a PublicGroupChannelListQuery
instance.
Like how you search group channels using filters, you can retrieve a list of Supergroup channels through the GroupChannelListQuery
's superChannelFilter
property. The query params is passed to the createMyGroupChannelListQuery(paramsBuilder:)
method of the GroupChannel
class.
When the channels are returned, you can tell which channel is a Supergroup channel by looking at the isSuper
property. If the property has a value of true
, the channel is a Supergroup channel.