Private subchannel overview
Community channels support private subchannels for scenarios where only designated users should be able to communicate within a subchannel.
Before using private subchannels, read the Community channel overview to understand how subchannels work.
Known limitations
If a user is not on the private subchannel member list but sends a message to the subchannel, the message cannot be delivered to the server. However, it is stored in the local database and may generate a local channel record.
Recommended workaround: Maintain a private subchannel member list on your app server. Prevent users who are not on the list from sending messages to the private subchannel.
Understanding private subchannels
The client SDK does not provide APIs for creating private subchannels or changing subchannel types. Use the Server API for these operations.
Community subchannels are categorized as public or private:
- Public subchannels are open to all community members. All members receive messages from public subchannels.
- Private subchannels are restricted to the subchannel's member list. Only members can send and receive messages and receive status notifications.
Public subchannels can be switched to private, and vice versa.
For example, an admin can create a new subchannel as private, then invite specific community members. Only invited members can view the subchannel, receive messages, and send messages.
Changing the subchannel type affects remote message retrieval permissions:
- Public → Private: Only users on the current private subchannel member list can retrieve historical messages (including messages from when the subchannel was public).
- Private → Public: All community members can retrieve historical messages (including messages from when the subchannel was private).
Management APIs
| Feature | Client API | Server API |
|---|---|---|
| Create a private subchannel | Not available | Create a subchannel |
| Delete a private subchannel | Not available | Delete a subchannel |
| List subchannels | Not available | List subchannels |
| Change subchannel type | Not available | Change subchannel type |
Understanding the private subchannel member list
The client SDK does not provide APIs for managing private subchannel member lists. Use the Server API to query, add, or remove members.
When a subchannel is private, only users on the member list can send and receive messages and receive status notifications.
When a private subchannel is switched to public, it becomes open to all community members. The member list data is preserved — if the subchannel is switched back to private, the list takes effect again.
You can also pre-create a member list for a public subchannel. The list takes effect when the subchannel is switched to private.
- Deleting a subchannel also clears its private member list.
- When a user leaves the community, the server automatically removes them from all private subchannel member lists.
Management APIs
| Feature | Client API | Server API |
|---|---|---|
| Add members | Not available | Add private subchannel members |
| Remove members | Not available | Remove private subchannel members |
| Query member list | Not available | Query private subchannel members |