Channel Moderation

Channel Moderation is an essential feature for creating a safe and engaging chat community. With Amity Chat SDK, developers can use moderation to manage chat channels effectively and ensure that the chat community remains safe and welcoming. Moderation features such as user banning and muting can help prevent inappropriate content and maintain a positive chat environment.

Add / Remove Roles

Roles define varying levels of access and permissions that can be assigned to users within a chat channel. Each role is defined by a set of permissions that determine what actions a user can perform within the channel.

Roles can be assigned to users based on factors such as their level of participation in the chat community or their specific responsibilities within the channel. For example, a moderator might have the ability to remove inappropriate messages or ban users from the channel, while a regular user might only have the ability to send and receive messages. For more information, please refer to the Roles and Permission page.

Permission

You can check your permission in channel by sending AmityPermission enums to AmityCoreClient.hasPermission(amityPermission). For more information, please refer to the Roles and Permission page.

Add / Remove Members

AmityChannelMembership provides methods to add and remove members, as well as removing yourself as a member of the channel (leaving the channel).

  • channelId: The ID of the channel to which you want to add or remove members.

  • userIds: An array of user IDs to be added to the channel or removed from the channel.

Ban / Unban Members

ChannelRepository class also provides various methods to moderate the users present in channel. You can ban/unban users, assign roles or remove it from user.

For the banMembers function, the following parameters are required:

  • channelId: The ID of the channel from which the members are being banned.

  • userIds: An array of user IDs to be banned from the channel.

For the unbanMembers function, the following parameters are required:

  • channelId: The ID of the channel from which the members are being unbanned.

  • userIds: An array of user IDs to be unbanned from the channel.

Last updated