A user who is invited to a group channel can either accept or decline the invitation. If a user accepts an invitation, they join as a new member and can start chatting with other members in the channel. If the user declines an invitation to join a channel, the invitation no longer exists. Since a user is only allowed to join up to 2,000 group channels, if a user who already belongs to a maximum number of group channels receives an invitation, it will be automatically canceled.
Note: By implementing the
InvitationDeclined()of a channel event handler, you can make the client apps of other members in the foreground to be notified of the results of two actions above. For more information, see the Event handler page.
SBDMain::SetChannelInvitationPreference(), you can determine whether users will automatically join a private group channel promptly from an invitation without having to accept it. By default, the value of channel invitation preference is set to true. To give users the options to accept or decline an invitation, set the value of invitation preference to false using
SBDMain::SetChannelInvitationPreference() like the code below.