/ SDKs / Unreal
SDKs
Chat SDKs Unreal v3
Chat SDKs Unreal
Chat SDKs
Unreal
Version 3

Join and leave a channel

Copy link

This is only for public group channels where any user can join and chat as a member without an invitation. A user can also leave a group channel, in which the user can't receive messages from the channel anymore.


Join a group channel as a member

Copy link

A user is allowed to join up to 2,000 group channels. If a user already belongs to a maximum number of group channels, the user won't be able to join another channel. For private group channels, only users who are invited as a member can join the channel.

if (groupChannel->is_public) {
    groupChannel->JoinChannel([](SBDError* error) {
        if (error != nullptr) {
            // Handle error.
            return;
        }
    });
}

Leave a channel

Copy link

A user can leave group channels as shown below. After leaving, the user can't receive messages from the channel, and this method can't be called for deactivated users.

if (groupChannel->is_public) {
    groupChannel->LeaveChannel([](SBDError* error) {
        if (error != nullptr) {
            // Handle error.
            return;
        }
    });
}