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
The Event object has the following properties:
| Parameter | Description |
|---|---|
TimetokenType: FString | Timetoken of the message that triggered an event. |
TypeType: EPubnubChatEventType | Type of action that emits an event: PCET_TYPING, PCET_REPORT, PCET_RECEIPT, PCET_MENTION, PCET_INVITE, PCET_CUSTOM, PCET_MODERATION. |
ChannelIDType: FString | Target channel where this event is delivered. |
UserIDType: FString | Unique ID of the user that triggered the event. |
PayloadType: FString | Data passed in an event that differ depending on the event type. |
For details, refer to the chat events documentation.
Use case
Events enable:
- Collecting historical chat events
- Creating custom events
- Building moderation dashboards for flagged messages
- Triggering business logic with Functions