Message object
Message represents a single message published on a chat channel.
Properties
The Message object has the following properties:
| Parameter | Description |
|---|---|
TimetokenType: FString | Unique identifier for the message, possibly a timestamp or similar value that helps order messages in a conversation. |
MessageDataType: FPubnubChatMessageData | Additional data. |
> TypeType: FString | The type of the message. "text" by default. |
> TextType: FString | Original text content of the message. |
> ChannelIDType: FString | Unique identifier for the channel or group in which the message was sent. |
> UserIDType: FString | Unique ID of the user who sent the message. |
> MetaType: 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}. |
> MessageActionsType: TArray<FPubnubChatMessageAction> | Any actions associated with the message, such as reactions, replies, or other interactive elements. |
Methods
You can call the following methods on the Message object.
Click on each method for more details.
CreateThread()Delete()EditText()Forward()GetCurrentText()GetMessageTimetoken()GetReactions()GetThread()GetType()HasThread()HasUserReaction()IsDeleted()Pin()RemoveThread()Report()Restore()ToggleReaction()Unpin()
Streaming
Call these methods to subscribe to or unsubscribe from real-time updates for this Message object.
Use case
Message methods enable: