Manage Channel Members

1. Invite Users

You can invite members to the channel even if you are not the owner.

circle-info

Any member can add another member to channel.

const resp = await client.addChannelMembers({
    channelId: 'my_channel',
    members: ['new_user1', 'new_user_2'],
});

2. Remove Members

circle-info

Only the channel owner can remove members.

const resp = await client.removeChannelMembers({
    channelId: 'my_channel',
    members: ['new_user1', 'new_user_2'],
});

3. Get Channel Member List

circle-info

For super channel, this is the only way to get channel members.

const numOfRows = 5;

const resp = await client.getChannelMembers({
    channelId: 'my_channel',
});

if (resp.hasNext) {
    const lastUserId = resp.users[resp.users.length - 1].id;
    const moreResp = await client.getChannelMembers({lastUserId, limit: numOfRows});
}

4. Ban Users

circle-info
  • Only the channel owner can ban users.

  • Banned users are immediately removed from the channel and cannot join the channel until unbanned by the channel owner.

5. Unban Users

circle-info

Only the channel owner can unban users.

6. Get Banned User List

circle-info

Only the channel owner can view this list.

7. Mute Members

Mute feature allows the channel owner to mute specific members in the channel. Muted members are not allowed to send messages.

circle-info
  • Only the channel owner can mute other members.

  • expireInMinutes specifies when mute status is expired. Default value for expireInMinutes is 0 (no expiry).

8. Unmute Members

circle-info

Only the channel owner can unmute other members.

9. Get Muted User List

circle-info

Only the channel owner can view this list.

10. Peer Mute

You can 'peer mute' another member in the channel.

circle-info
  • Any user can 'peer mute' another member in the channel.

  • If you 'peer mute' another member, you will stop seeing messages from that particular member in the channel but other users will continue to see messages from that member in the channel.

  • There is no push notification or event handler for this event.

  • expireInMinutes allows you to control when 'peer mute' status expires. Default value for expireInMinutes is 0 (no expiry).

11. Get Peer Muted List

12. Peer Mute

You can 'unmute peer' another member in the channel.

circle-info
  • There is no push notification or event handler for this event.

Last updated