Search group channels by name, URL, or other filters
You can search for specific private or public group channels by using several types of search filters within the GroupChannelListQuery
and PublicGroupChannelListQuery
classes.
Search private group channels
A GroupChannelListQuery
instance provides many types of search filters such as channelNameContainsFilter
and channelURLsFilter
. You can use these filters to search for specific private group channels.
The sample code below shows the query instance with channelNameContainsFilter
, which returns a list of the current user's group channels that partially match the specified keyword in their channel names.
The following shows the query instance with channelURLsFilter
, which returns a list of the current user's group channels that partially match the specified keyword in their channel URLs.
The following table shows all supported filters for GroupChannelListQuery
to search for specific channels you want to retrieve. You can use any filters in a similar fashion with the sample code above.
List of filters
Name | Filters |
---|---|
Group channels with one or more specified custom types. | |
Group channels with a custom type that starts with the specified value. | |
Group channels that contain the specified value in their names. | |
Group channels with one or more specified channel URLs. | |
Either super or nonsuper group channels. | |
Either public or private group channels. | |
Group channels with one or more unread messages. | |
Group channels with the specified hidden state and operating behavior. | |
Group channels based on whether the user has accepted an invitation. | |
Group channels that contain members with one or more specified user IDs. | |
Group channels that include one or more members with the specified user IDs. | |
Group channels with members whose nicknames contain the specified value. | |
Group channels with metadata containing an item with the specified value as its key. This filter is effective only when the metadata are sorted in alphabetical order. |
Search public group channels
A PublicGroupChannelListQuery
instance provides several types of search filters such as channelNameContainsFilter
and channelURLsFilter
. You can use these filters to search for specific public group channels.
The sample code below shows the query instance with channelNameContainsFilter
, which returns a list of the current user's group channels that partially match the specified keyword in their channel names.
The following shows the query instance with channelURLsFilter
, which returns a list of the current user's group channels that partially match the specified keyword in their channel URLs.
The following table shows all supported filters for PublicGroupChannelListQuery
to search for specific channels you want to retrieve. You can use any of the filters with the sample code above.
List of filters
Name | Filters |
---|---|
Group channels with one or more specified custom types. | |
Group channels with a custom type that starts with the specified value. | |
Group channels that contain the specified value in their names. | |
Group channels with the specified channel URLs. | |
Either super or nonsuper group channels. | |
Specifies public group channels to retrieve based on membership. Acceptable values are | |
Group channels with metadata containing an item with the specified value as its key. This filter is effective only when the metadata are sorted in alphabetical order. |
Retrieve a list of Supergroup channels using a filter
You can retrieve a list of Supergroup channels through the GroupChannelListQuery
instance that is created by the createMyGroupChannelListQuery(paramsBuilder:)
method of the GroupChannel
class. A Supergroup channel is determined by the isSuper
property. If the property has a value of true
, the channel is a Supergroup channel.