A private discussion group allows you to create an "invite-only" discussion group so that people can discuss a topic privately.
Start by creating a channel object:
You can discover a private channel by name or view all your private channels. Note that only the channel owner discover a channel by name or view their list of private channels.
Discover a specific private channel:
Find all private channels (all current user's private channels):
Invite users to join a channel:
The EventListener is leveraged to listen for incoming invites:
Let's get more information about the channel, like name, summary and owner.
Accept an invite.
Decline an invite.
To receive an invitation response:
To add subscribers to your private channel, refer to the following code. Note that only the private channel owner can add subscribers.
To get the list of channels that the current user is subscribed to (both private and public):
To publish a message to the private channel:
When logged in, messages can either be retrieved using myPrivateChannel.getMessages()
or can be received by setting up a listener with Max.EventListener
:
To remove a subscriber from a private channel, refer to the following code. Note that only the private channel owner can remove subscribers.