Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Our SDK provides a convenient way to create a new community on our platform, with several parameters available to customize the community.
displayName
- allows users to set the public display name of the community, which will be visible to other users who can access the community.
description
- allows users to provide a description of the community, which can help other users understand the purpose and focus of the community.
isPublic
- is used to specify the type of the community. Setting it to false
will create a private community, while setting it to true
will create a public community.
postSettings
- allows users to customize the community post settings. This parameter can be used to configure how posts are moderated within the community, depending on the specific needs and preferences of the community creator.
storySettings
- allows users to customize the community story settings. This parameter can be used to configure whether to enable comment interaction on stories.
metaData
- allows users to include additional properties to support custom fields within the community. This can be useful for creating communities with specific requirements or features that are not available by default in our platform.
Version 6
Beta (v0.0.1)
Users can retrieve information about the community, such as the community name, description, and member count, without actually becoming a member of the community. This provides a way for users to explore their community options and find the communities that are most relevant and engaging to them.
To fetch a community's data without joining, users can simply call the getCommunity
method within the SDK and provide the relevant parameter, such as the community ID. The retrieved result is returned as a live object of a post. For more information on live objects, please refer to Live Objects/Collections.
Version 6
Beta(v0.0.1)
In order to get live update from any changes or bind with StreamBuilder
widget, you can alternatively use AmityCommunity.listen
The joinCommunity
function works by adding the active user as a member of the specified community. By becoming a member of a community within your app, users can connect with like-minded individuals and build deeper relationships within the community. To join a community, you simply need to pass the specific community ID as a parameter of the joinCommunity
function.
Version 6
Beta (v0.0.1)
The leaveCommunity
function works by removing the active user as a member of the specified community. This removes the user's access to the community feed and disables their ability to post messages or participate in community discussions. To leave a community, you simply need to pass the specific community ID as a parameter of the leaveCommunity
function.
Version 6
Beta (v0.0.1)
The update community method works by providing moderators or a creator of the community with a way to modify various aspects of their community settings. For example, moderators can update the community name, description, or avatar to reflect changes in the community. They can also update the post settings to control who can create posts in the community.
displayName
- allows users to set the public display name of the community, which will be visible to other users who can access the community.
description
- allows users to provide a description of the community, which can help other users understand the purpose and focus of the community.
isPublic
- is used to specify the type of the community. Setting it to false
will create a private community, while setting it to true
will create a public community.
postSettings
- allows users to customize the . This parameter can be used to configure how posts are moderated within the community, depending on the specific needs and preferences of the community creator.
storySettings
- allows users to customize the community story settings. This parameter can be used to configure whether to enable comment interaction on stories.
metaData
- allows users to include additional properties to support custom fields within the community. This can be useful for creating communities with specific requirements or features that are not available by default in our platform.
Version 6
Beta (v0.0.1)
Please note that Flutter doesn't support updating post settings yet.
By default, only the original creator of the community or the system administrators can update the community.
By presenting users with a list of trending communities, and recommending communities, the SDK can help to promote a more dynamic and engaging user experience within your app. This can help to foster greater engagement, collaboration, and communication among members, promoting a more supportive and inclusive community atmosphere.
The getTrendingCommunities
method works by identifying communities that are currently having high levels of members where the user may or may not be part of.
Version 6
Beta (v0.0.1)
The getRecommendedCommunities
method works by identifying communities that are currently having high levels of members where the user is not be part of.
Version 6
Beta (v0.0.1)
Note: You can fetch a maximum of 15 items from the trending and recommendation communities at once.
To retrieve a list of community members, users can call the relevant method and provide the desired membership options and sorting parameters. For example, they may choose to sort the list of members by name or by date created, or they may specify certain membership options, such as only retrieving members who are not banned. The result of the method will always return as Live collection.
To query community members with certain criteria, the following parameters are used:
membershipOptions
: allows users to filter the results based on the membership status of community members. Passing an empty option or not passing and option set for membershipOptions
parameter will default to member
.
member
- will filter out all banned members and only include unbanned members.
ban
- will only include banned members in the results.
roles
: allows users to query for members with default moderator roles by using "channel-moderator" or "community-moderator" as the value. At this moment, we do not have a way to query for member-only roles. For custom roles assigned to members, users can pass in the roleId
of the custom role to filter members by this role.
sortBy
: allows users to specify the sorting method for the returned collection. The possible values include firstCreated
, lastCreated
. The firstCreated
sort option will be specified by default if it isn't specified. When a keyword is provided, leading to a list sorted by search rank.
To query community banned members, only the 'Admin' role is currently allowed, while 'Moderators' and 'Users' are not allowed to query community banned members.
Please note that you can only assign custom roles to a member in a community via the SDK. This feature is not yet available in the Amity Console.
If you assign a custom role to a user via the Amity console, the role will only be applied at the user level and not at the community level, and if you try to query for a member with this custom role, no results will be returned.
Passing an empty option set for membershipOptions
parameter will default to .member
.
Below is the sample code to get a list of community members. This method will return a LiveCollection
instance.
Version 6
Beta(v0.0.1)
To search for community members, users can call the relevant method and provide the desired keyword, roles and membership options parameters. For example, they may specify certain membership options, such as only retrieving members who are not banned. The result of the method will always return as Live collection.
If no keyword is supplied, the list of users for the specified community will be sorted by the date they joined.
To search for community members with certain criteria, the following parameters are used:
keyword
: allows users to specify the keyword to search for. The result contain members with either matching displayName
or userId
membershipOptions
: allows users to filter the results based on the membership status of community members. Passing an empty option or not passing and option set for membershipOptions
parameter will default to member
.
member
- will filter out all banned members and only include unbanned members.
ban
- will only include banned members in the results.
roles
: allows users to query for members with default moderator roles by using "channel-moderator" or "community-moderator" as the value. At this moment, we do not have a way to query for member-only roles. For custom roles assigned to members, users can pass in the roleId
of the custom role to filter members by this role.
To query community banned members, only the 'Admin' role is currently allowed, while 'Moderators' and 'Users' are not allowed to query community banned members.
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.
To add roles to community members, users can provide the roles
and userIds
as parameters, specifying which roles should be added to which members.
Version 6
Beta (v0.0.1)
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.
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.
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.
Version 6
Beta (v0.0.1)
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.
Version 6
Beta (v0.0.1)
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.
Version 6
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.
Version 6
Note:
The community creator is automatically assigned as the community moderator.
The previous/last moderator is not allowed to leave a community and an error is displayed.
The community moderator can promote a user/member to moderator.
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.
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.
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!)
The SDK provides a way for creators or moderators to delete a community by calling the deleteCommunity
method. In the JavaScript SDK, this method is referred to as the closeCommunity
method.
To delete a community using this method, users can call the method and provide the communityId
as a parameter. This will trigger the deletion process, which will remove the community and associated community data.
It is important to note that deleting a community is a permanent action and cannot be undone. As such, it is recommended that users exercise caution when deciding to delete a community and ensure that they have taken all necessary precautions to preserve any important content or data associated with the community.
Version 6
Beta (v0.0.1)
The queryCommunities
method can be useful for users who are new to your app or are exploring their community options. By providing a way to explore for communities, you can help users to discover the full range of community options available within your app.
To query communities with certain criteria, the following parameters are used:
displayName
allows you to filter communities based on the community's displayName.
filter/membership
allows you filter communities based on the logged-in user membership status.
categoryId
allows you filter communities based on community categories.
sortBy
allows you filter communities based on the order that the communities were created or based on alphabetical order, last created, and first created.
includeDeleted
allows you specify if you want to include deleted communities in your query. By passing true
or false
to this method, you can include or exclude deleted communities from the results.
If you'd like to fetch all communities, you can pass the keyword as null
.
Version 6
Beta(v0.0.1)
Build and nurture vibrant communities where users can exchange and connect
Amity Social Cloud includes a powerful Community feature that allows users to share their thoughts and engage with each other within your app. By harnessing the power of communities, you can create a more dynamic and engaging user experience, promoting collaboration, communication, and participation among users.
Community provides users with a dedicated space to discuss specific topics or interests, enabling them to connect with like-minded individuals and build deeper relationships within the community. By providing a structured and organized approach to community engagement, Community can help to foster a more engaged and supportive community, promoting greater participation and collaboration among users.
Our product provides two types of communities: public and private.
Public - A public community is visible to anyone without any specific permissions. This means that anyone can find and join the community, and all content posted within the community is visible to anyone who has access to the community.
Private - On the other hand, a private community is only visible to the creator and invited members. This type of community provides greater privacy and control over the content shared within the community. Only members who have been invited to join the community can see and interact with the content and other members within the community.
Our product is designed to provide users with flexibility and control over their communities, allowing them to choose the type of community that best fits their needs and preferences.
Community Post Settings allows the community creator and community moderators to control who can create posts within a community and how those posts are moderated.
There are three possible options for Community Post Settings :
anyoneCanPost
: This setting allows anyone to create a post within the community and add it to the community feed immediately. There is no moderation required for these posts.
adminReviewPostRequired
: This setting allows users to create posts within the community, but adds another layer of moderation. Community moderators can review each post and decide whether or not it should be included in the community feed.
onlyAdminCanPost
: This setting restricts post creation to community moderators only. Regular users are not able to create posts within the community.
To check the community post settings, users can call the postSettings
property, which returns a CommunityPostSettings
object. This allows community administrators to easily manage and adjust their community settings to meet the needs of their community and ensure a positive user experience.
By default, the postSettings
value is set to anyoneCanPost
. In this case, member's posts will be displayed in the community feed without any review from admin.
Name | Data Type | Description |
|
| ID of the community |
|
| ID of the channel |
|
| ID of the user who created the comment |
|
| Community name for displaying |
|
| Avatar object |
|
| Description of the community |
|
| Is this community official? |
|
| Is this community public? |
|
| only admins can post in this community |
|
| List of tags used for searching |
|
| Additional properties to support custom fields |
|
| Number of posts in community |
|
| Number of members in community |
|
| Is this community joined? |
|
| ID of categories |
|
| Is this community deleted? |
|
| Date/time when the community was created |
|
| Date/time when a community is updated or deleted |
|
| Flag for checking internally if post inside community is reported or not |
|
| Community post settings within a community, how posts are moderated |
The CommunityRepository also provides a way to manage community categories. When communities are placed into categories, users can easily sort and filter communities based on their category, allowing for more efficient and effective community management.
Note: Categories can only be created and updated from Amity Social Cloud Console.
To get a particular community category, users can utilize the getCategory
method provided by the CommunityRepository. This method accepts a categoryId
as a parameter and returns information about the specified category.
The functionality isn't currently supported by this SDK.
Version 6
Beta (v0.0.1)
The functionality isn't currently supported by this SDK.
CommunityRepository also provides the categoryQuery
method, which allows users to obtain the categories currently available on the system. This method returns a collection of categories.
To query community categories with certain criteria, the following parameters are used:
sortBy
allows you filter communities based on the order that the community categories were created or based on alphabetical order, last created, and first created.
includeDeleted
allows you specify if you want to include deleted community categories in your query. By passing true
or false
to this method, you can include or exclude deleted community categories from the results.
Version 6 and Beta(v0.0.1)