On this page

Event object

Event represents a single piece of information emitted during chat operations: typing indicators, message receipts, mentions, or reports.

Unlike other Chat SDK entities, Event provides no methods - it only passes payloads emitted during chat operations.

Properties

Event has the following properties:

1class Event<T extends EventType> {
2 timetoken: string
3 type: T
4 payload: EventPayloads[T]
5 channelId: string
6 userId: string
7}
ParameterDescription
timetoken
Type: string
Timetoken of the message that triggered an event.
type
Type: T
Type of action that emits an event: typing, report, receipt, mention, invite, moderation, or custom.
payload
Type: EventPayloads[T]
Data passed in an event that differ depending on the event type.
channelId
Type: string
Target channel where this event is delivered.
userId
Type: string
Unique ID of the user that triggered the event.
icon

Event structure

Use case

Events enable:

  • Collecting historical chat events
  • Creating custom events
  • Building moderation dashboards for flagged messages
  • Triggering business logic with Functions
Last updated on
On this page