On this page

Message object

Message represents a single message published on a chat channel.

Properties

The Message object has the following properties:

ParameterDescription
Timetoken
Type: FString
Unique identifier for the message, possibly a timestamp or similar value that helps order messages in a conversation.
MessageData
Type: FPubnubChatMessageData
Additional data.
 → Type
Type: EPubnubChatMessageType
The type of the message. EPubnubChatMessageType::PCMT_TEXT by default.
 → Text
Type: FString
Original text content of the message.
 → ChannelID
Type: FString
Unique identifier for the channel or group in which the message was sent.
 → UserID
Type: FString
Unique ID of the user who sent the message.
 → Meta
Type: FString
Extra information added to the message giving additional context. This object can be of any type and can consist of a list of key-value pairs. For example, {language: 'English', wordCount: 42}.
 → MessageActions
Type: Array<FPubnubMessageAction>
Any actions associated with the message, such as reactions, replies, or other interactive elements.
icon

Message-related types

Methods

You can call the following methods on the Message object.

Click on each method for more details.

Use case

Message methods enable:

Last updated on