Create Community

When creating a new community, first, instantiate the CommunityRepository, a class that contains all community-related methods. Then, call createCommunity() to obtain the LiveObject and observe it in order to obtain the final community model.

For detailed information on the possible postSetting values, see Community Post Settings.

If you want to set the community avatar, you need to upload the avatar image first. The avatarFileId is the fileId from the model you will receive from the live object used to upload file via FileRepository. To upload files and images, refer to File Handling.

Note that the event listener was registered using once(). Unlike on(), once() will automatically unregister the event listener once the first event is emitted. This is useful if you just need to use the model once but do not need to listen to further events.

Last updated