SIGN UP

Message

Interface that represents a message within a conversation.

Methods

remove

remove(): Promise<MessageEvent|ErrorEvent>

Remove the message from the conversation.

The participant that calls this method should have:

Other parties of the conversation (online participants and logged in clients) can be informed about the message removing via the MessengerEventTypes.RemoveMessage event.

Returns

update

update(text: string, payload: Array<object>): Promise<MessageEvent|ErrorEvent>

Send text and payload changes to the cloud.

The participant that calls this method should have:

Other parties of the conversation (online participants and logged in clients) can be informed about the message updating via the MessengerEventTypes.EditMessage event.

To be informed about the message updating while being offline, participants can subscribe to the MessengerNotification.EditMessage messenger push notification.

Parameters

  • text:

    string

    New text of this message, maximum 5000 characters. If null, message text will not be updated.

  • payload:

    Array<object>

    New payload of this message. If null, message payload will not be updated.

Returns

Properties

conversation

The UUID of the conversation this message belongs to. The message can belong to the one conversation only.

payload

The array of payload objects associated with the message.

sequence

The message sequence number in the conversation.

text

The text of this message.

uuid

The universally unique identifier (UUID) of the message.