Skip to main content
All CollectionsPortal-X Pages
Design | Messaging | Chat
Design | Messaging | Chat

Manage the Chat settings for your app

Jason Liang avatar
Written by Jason Liang
Updated over a week ago

Chat is a powerful way to boost engagement in your app.

Chat allows end-users to communicate with each other in realtime. All communication is directed to channels, and pushed to participating users in realtime via RTT. A rolling history of chat messages is maintained per channel. These settings configure the maximum sizes of chat messages and the size of history to be maintained.

Pro-tip: set limits as low as possible to minimize usage costs.

This feature requires RTT, which can be enabled via Advanced Settings.

Profanity filtering requires WebPurify integration, which can be configured on the Manage Integrations page.

Design Concepts:

  • Chat messages are directed to channels.

  • Channels have two important relationships with users:

    • members (subscribers) - persistent members of the channel. i.e. those who can access messages, and are allowed to "listen" to real-time chat.

    • listeners - online members who are listening right now! Chat messages are "pushed" only to active listeners

  • There are different types of channels (global, group, dynamic, and system) - determined by how membership and listeners are managed.

  • Channels can be active or inactive.

    • active channels have active listeners and/or history

    • inactive channels are channels without history that don't have any active listeners either.

  • Users can choose to listen to an inactive channel. Once they do, the channel becomes active.

  • Real-time chat events are sent to online users (i.e. from API Server → EventServer → Clients) via one of two mechanisms (i.e. CHAT_BROADCAST or CHAT_DIRECT).

Configure Chat:

After enabling Chat via the checkbox, you will be able to configure the following:

  • Chat message size (1-2048 bytes): This is the max byte size for a given message. 256 is a common value for each chat message.

  • Max history per channel (1-250 messages): Number of chat messages to store so someone logging in the middle of the conversation can view the history of recent messages for context.

  • Channel inactivity timeout (1-180 days): Number of days without new messages before the channel history is cleared. Values as low as a week or even lower should be fine.

  • Replace profanity with: If you have a webPurify account integrated, enabling this will block inappropriate words from polluting your channel.

    Note: if you have not set the webPurify properly, keep this checkbox unchecked, otherwise you will get an error when testing chats on the next step.

    • Disallow Emails, phone numbers, and URLs: These are commonly inappropriate forms of content you are likely to want to remove.

    • Restrict check to user's own language: Filter a user’s chat messages, and updates to their name, by their own language only (instead of against all configured languages).

    • Restrict text for unsupported languages across ALL languages: Filter the chat message if the language is not supported by your webPurify languages settings.

Chat test:

Once the chat service is enabled, you can set up a chat channel to test it, refer to the Chat Channels help page for the details.

Did this answer your question?