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.
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.
You can use ChannelRepository
class to add / remove users from a role
Supported ✅ (please wait while we prepare a real example!)
Supported ✅ (please wait while we prepare a real example!)
The channel creator is automatically assigned as the channel moderator.
The previous/last moderator is not allowed to leave a community and an error is displayed.
The channel moderator can promote a user/member to moderator.
The channel moderator can demote a moderator to a user/member.
This applies only to Live and Community channels’. This does not apply to Conversation Channel.
You can check your permission in channel by sending Permission
enums to CoreClient.hasPermission(amityPermission)
.
Supported ✅ (please wait while we prepare a real example!)
The functionality isn't currently supported by this SDK.
Supported ✅ (please wait while we prepare a real example!)
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.
Version 6
Add Channel Members
Remove Channel Members
Beta (v0.0.1)
Add Channel Members
Remove Channel Members
The functionality isn't currently supported by this SDK.
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.
Version 6
Ban members
Unban members
Beta (v0.0.1)
Ban members
Unban members
Supported ✅ (please wait while we prepare a real example!)