Links

Community Moderation

Amity Community Moderation provides a way to moderate the community by multiple ways. This provides another layer of control over community member access and permissions, allowing the creator or admin to manage the community more effectively and ensure that members have the appropriate roles and permissions to perform their duties within the community.

Add Roles

To add roles to community members, users can provide the roles and userIds as parameters, specifying which roles should be added to which members.
iOS
Android
JavaScript
TypeScript
Flutter
Version 6
Beta (v0.0.1)

Remove Roles

Similarly, to remove roles from community members, users can provide the roles and userIds as parameters, specifying which roles should be removed from which members.
iOS
Android
JavaScript
TypeScript
Flutter
Version 6
Beta (v0.0.1)
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.

Add Members

To add members to a community, users can specify the userIds and communityId of the members they want to add. This function will add the specified users to the specified community, granting them access to the community and its content.
iOS
Android
JavaScript
TypeScript
Flutter
Version 6
Beta (v0.0.1)

Remove Members

To remove members from a community, users can specify the userIds and communityId of the members they want to remove. This function will remove the specified users from the specified community, revoking their access to the community and its content.
iOS
Android
JavaScript
TypeScript
Flutter
Version 6
Beta (v0.0.1)

Ban Users

The banMembers method accepts an array of userId as a parameter, which allows the creator or moderators of a community to ban multiple members at once. This feature provides a quick and efficient way to enforce community rules and ensure that members who violate those rules are appropriately restricted.
iOS
Android
JavaScript
TypeScript
Flutter
Version 6

Unban Users

The unbanMembers function accepts an array of userId as a parameter, which allows the creator or moderators of a community to quickly remove the ban from multiple members. This feature can be useful when a banned member has corrected their behavior and is ready to rejoin the community.
iOS
Android
JavaScript
TypeScript
Flutter
Version 6
Note:
  1. 1.
    The community creator is automatically assigned as the community moderator.
  2. 2.
    The previous/last moderator is not allowed to leave a community and an error is displayed.
  3. 3.
    The community moderator can promote a user/member to moderator.
  4. 4.
    The community moderator can demote a moderator to a user/member.
This applies only to Live and Community channels’. This does not apply to Conversation Channel.

Permission

The SDK provides a convenient way for users to check their permissions within a community by using the Client.hasPermission method.
To use this method, users can send one of the available Permission enums as a parameter to the method. The method will then check if the user has the specified permission within the community and return a boolean value indicating whether or not the user has that permission.
iOS
Android
JavaScript
TypeScript
Flutter
Supported ✅ (please wait while we prepare a real example!)
Supported ✅ (please wait while we prepare a real example!)
Supported ✅ (please wait while we prepare a real example!)
Last modified 6mo ago