Join/Leave Community

Join Community

The join() 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.

Network-Level Membership Settings

Your network can be configured with different membership acceptance modes:

  • Automatic membership (default): Users become members immediately when added

  • Invitation acceptance: Users receive an invitation and must explicitly accept before joining

Community Types and Join Behavior

Public Communities

  • Doesn't require approval: Users can join immediately by calling joinCommunity

  • Requires approval: Users must submit a join request and wait for moderator approval

Private & Visible Communities

  • Discoverable in search and explore pages

  • Content is hidden from non-members

  • Typically requires moderator approval to join

Private & Hidden Communities

  • Not discoverable by non-members

  • Content is hidden from non-members

  • Requires moderator approval to join

To join a community, you simply need to call join() method present in Community object. If a community requires moderator approval, the join process creates a request instead of immediate membership:

Managing Join Requests

For Users

Check Join Request Status

Users can check the status of their submitted join requests:

Cancel Join Request

Users can cancel pending join requests:

For Moderators

Get Pending Requests

Moderators can retrieve all pending join requests for their communities:

Approve Join Request

Reject Join Request

Leave Community

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.

Last updated

Was this helpful?