Message object
Message is an object that refers to a single message published on a chat channel.
Properties
The Message object has the following properties:
1class Message {
2    timetoken: string,
3    content: TextMessageContent,
4    channelId: string,
5    userId: string,
6    actions?: MessageActions,
7    meta?: {
8        [key: string]: any
9    },
10    error?: string
11}
| Parameter | Description | 
|---|---|
| timetokenType:  string | Unique identifier for the message, possibly a timestamp or similar value that helps order messages in a conversation. | 
| contentType:  TextMessageContent | Original text content of the message. | 
| channelIdType:  string | Unique identifier for the channel or group in which the message was sent. | 
| userIdType:  string | Unique ID of the user who sent the message. | 
| actions | Any actions associated with the message, such as reactions, replies, or other interactive elements. | 
| metaType:  objectorundefined | 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}. | 
| errorType:  stringorundefined | Error added to the message when either the message or files it contains couldn't be decrypted. For more information, refer to the Data security section. | 
Methods
You can call the following methods on the Message object.
Click on each method for more details.
- createThread()
- delete()
- (getter) deleted
- (getter) hasThread
- editText()
- forward()
- getMessageElements()
- getThread()
- hasUserReaction()
- toggleReaction()
- pin()
- (getter) quotedMessage
- (getter) reactions
- removeThread()
- report()
- restore()
- streamUpdates()
- (static) streamUpdatesOn()
- (getter) text
Use case
For example, you can use the Message object methods to:
