Community Moderation
AmityCommunityModeration
class provides a way to moderate the community by banning or unbanning users. banMembers(_:)
method accepts an array of user ids to ban and unbanMembers(_:)
accepts an array of user ids to unban.
You can also add/remove roles using addRoles(_:)
and removeRoles(_:)
method. These functions accept an array of string as an argument that contains the roles that you want to add or remove from a specific user.
addRoles(_:)
and removeRoles(_:)
do not create new roles but assign and remove existing roles from given users. You can add or remove default roles as well as custom roles.
Note:
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.
Last updated