Updating Channel Members

LAST EDIT Nov 29 2021

Adding & Removing Channel Members

Copied!

Using the addMembers() method adds the given users as members, while removeMembers() removes them.

Note: You can only add/remove up to 100 members at once.

Message parameter

Copied!

You can optionally include a message object that client-side SDKs will use to populate a system message. This works for both add and remove members

Hide history

Copied!

When members join a channel you can specify if they have access to the history or not. The history will be shown by default, set true to hide_history parameter to hide it for new members.

Leaving a channel

Copied!

It is possible for user to leave the channel without moderator-level permissions. Make sure channel members have RemoveOwnChannelMembership permission.

You can familiarize yourself with all permissions in Permissions section

Adding & Removing Moderators to a Channel

Copied!

Using the addModerators() method adds the given users as moderators (or updates their role to moderator if already members), while demoteModerators() removes the moderator status.

These operations can only be performed server-side and up to 100 moderators can be added or removed at once.