I want to get a list of PublicGroupChannels

I want users to see all the public channels. But I don’t know how.
Is it correct to fix it in GroupChannelListFragment? If so, please tell me how

Hello @sobop

Welcome to the Sendbird community!

To allow users to see all the public channels, you can make use of the GroupChannelListQuery class in the Sendbird Chat SDK for JavaScript.

In your GroupChannelListFragment, you can create an instance of the GroupChannelListQuery class and set the membershipFilter property to “ALL”. This will retrieve both channels where the current user is and isn’t a member.

Here’s an example of how you can implement this in your GroupChannelListFragment:

// Inside your groupchannelListFragment class
const query = groupchannel.createMyGroupChannelListQuery();
query.membershipFilter = "ALL";

query.next((channels, error) => {
  if (error) {
    // Handle error

  // Process the list of public channels
  channels.forEach((channel) => {
    // Display the channel to the user

By setting the membershipFilter to “ALL”, the query will retrieve both public channels where the current user is a member and channels where the current user is not a member. You can then process the list of channels and display them to the user as desired.

Reference: Search group channels by name, URL, or several types of filters | Chat JavaScript SDK | Sendbird Docs

Let me know if this helps.