Create a group channel
A group channel can be created any time a user invites another user in their client app. To create a group channel at the implementation level, you need to pass the IDs of users to invite as an argument to a parameter in the creation method.
Note: Before creating a group channel, you should make sure to turn on the
distinct
property of the channel. Otherwise, thedistinct
property will be turned off by default, in which a new channel will be created with the same group of members even if there is already an existing channel between them. In this case, multiple 1-to-1 channels between the same two users can exist, each with its own chat history and data.
Another way to create a new group channel is by following the implementation below and configuring SBDGroupChannelParams
.
List of arguments
Argument | Type | Description |
---|---|---|
| std::vector | Specifies a list of one or more users to invite to the channel. |
| std::wstring | Specifies the topic or the name of the channel. |
| boolean | Determines whether to reuse an existing channel or create a new channel. If set to true, returns a channel with the same users in the |
| std::wstring | Specifies the cover image URL of the channel. |
| std::wstring | Specifies additional channel information such as a long description of the channel or a |
| std::wstring | Specifies the custom channel type which is used for channel grouping. |
Using the cover_url
property and the UpdateChannel()
method, you can get and update the cover image URL of a channel.
Note: You can also create a group channel using the Chat API which helps you control channel creations and member invitations on your server-side.