Event object
An object that refers to a single piece of information emitted when someone is typing, receiving a message, mentioning others in a message, or reporting a message/user to the admin.
Contrary to other Unreal Chat SDK entities, this object provides no methods. Its only purpose is to pass payloads of different types emitted when certain chat operations occur.
Properties
The Event
object has the following properties:
Parameter | Type | Description |
---|---|---|
Timetoken | FString | Timetoken of the message that triggered an event. |
Type | EPubnubChatEventType | Type of action that emits an event: PCET_TYPING , PCET_REPORT , PCET_RECEIPT , PCET_MENTION , PCET_INVITE , PCET_CUSTOM , PCET_MODERATION . |
ChannelID | FString | Target channel where this event is delivered. |
UserID | FString | Unique ID of the user that triggered the event. |
Payload | FString | Data passed in an event that differ depending on the event type. |
For details, refer to the chat events documentation.
Use case
You can use events to collect historical chat events or create your own custom events. You can later visualize them in a graphical form (like a moderation dashboard for flagged users and messages) or create additional business logic with functions that these events can trigger.