Chat / Unreal
Current version: v3
Chat Unreal v3
Chat Unreal
Chat
Unreal
Home
/
Chat
/
Unreal
/
Channels

Retrieve a list of channels

You can obtain a list of all open channels by creating a SBDOpenChannelListQuery. The LoadNextPage() method returns a list of SBDOpenChannel objects. For group channels, you can get a list of the current user's group channels, using the SBDGroupChannelListQuery instance's LoadNextPage() method which returns a list of SBDGroupChannel objects.

Note: For group channels, you can also set an option to include empty channels with query.include_empty_channel = true. Empty channels are channels that have been created but doesn't contain sent messages. By default, empty channels are not shown.

Open channelGroup channel
SBDOpenChannelListQuery* query = SBDOpenChannel::CreateOpenChannelListQuery();

query->LoadNextPage([](vector<SBDOpenChannel*> openChannels, SBDError* error) {
    if (error != nullptr) {
        // Handle error.
        return;
    }
});