How can I distinguish between a 1:1 channel and a group messsaging channel?

In Sendbird, there are two basic types of channels: open channel and group channel. Among the group channels, there are two subtypes: 1-to-1 and 1-to-N.

A 1-to-1 channel is a private channel that allows two users to have a conversation. It is similar to direct messaging on Twitter or Instagram. To create a 1-to-1 channel, you can use the distinct property when creating a group channel. This property ensures that only two users can join the channel, and it also allows the channel to be resumed if the same two users attempt to create a new channel.

For example, let’s say User A and User B want to have a private conversation. User A creates a group channel with the distinct property set to true and invites User B to join. Now, only User A and User B can join this channel, and if they attempt to create a new channel, the existing channel will be resumed.

On the other hand, a group messaging channel is a chat that allows close interactions among a limited number of users. It can be used for small group discussions or team collaboration. To create a group messaging channel, you can use the group property when creating a group channel. This property allows multiple users to join the channel, and it can be either private or public.

For example, let’s say a team of five people wants to collaborate on a project. One of the team members creates a group channel with the group property set to true and invites the other four team members to join. Now, all five team members can join this channel and have a group conversation. The channel can be either private, where only invited members can join, or public, where anyone can join without an invitation.

A 1 to 1 channel is technically a Group Channel with just two users. Therefore, you can simply check if a channel is 1:1 with something like:

if (channel.getMemberCount() == 2) // channel is 1:1

In summary, a 1-to-1 channel is a private channel for two users, while a group messaging channel is a chat for a limited number of users, either private or public. The properties used to create these channels in Sendbird are distinct for 1-to-1 channels and group for group messaging channels.

For more information please refer: https://sendbird.com/docs/chat/v4/android/channel/overview-channel#1-overview