Rate this page:

Message

Interface representing a message within a conversation.

Methods

edit

Copy URL
edit(options: 

MessageEditOptions

):

Promise<ConversationMessageEventPayload>

Sends text and payload changes to the cloud.

Triggers the MessengerEventType.onEditMessage event for all participants in the conversation (online users and logged-in clients).

Throws a MessengerError if:

Returns a promise that resolves with a ConversationMessageEventPayload object.

Parameters

Returns

remove

Copy URL
remove(): 

Promise<ConversationMessageEventPayload>

Deletes the message in the conversation.

Triggers the MessengerEventType.onRemoveMessage event for all participants in the conversation (online users and logged-in clients).

Throws a MessengerError if:

Returns a promise that resolves with a ConversationMessageEventPayload object.

Returns

Props

conversation

Copy URL
conversation: 

string

The UUID of the conversation where the message has been posted.

payload

Copy URL
payload: 

UnknownObject[]

Array of payload objects associated with the message.

sequence

Copy URL
sequence: 

number

Message sequence number in the conversation.

text

Copy URL
text: 

string

The message text.

uuid

Copy URL
uuid: 

string

The universally unique identifier (UUID) of the message.