Skip to main content

Listen to an event

All events

  • type is the message type: text, image, audio, video, file…
  • preview is the first 140 characters of a text reply, and empty for media.
  • operatorName is the first name of the person who replied, or null for bots and AI agents.
  • error.code is one of invalid_params, invalid_payload, unknown_command or connection_failed.

Unread count

A reply counts as unread while the chat isn’t on screen: closed, in a tab that isn’t focused, or (on the website) in a browser tab in the background. Showing the chat resets the count to 0.
In the apps, replies are only counted once the chat has loaded. Call preload() after login so the badge works before the user first opens the chat.

Examples

Send replies to your analytics

Close your own container when the user taps close

When you show TalquiChat / <TalquiChat> inside your own modal or sheet, close it on closeRequested: