Rate this page:

Message

This API is in beta and subject to change.

Interface that represents a message within a conversation.

Methods

update

Copy URL
fun update(text: 

String?

,
payload:

List<Map<String, Any>>?

,
callback:

MessengerCallback<MessageEvent>?

):

Unit

This API is in beta and subject to change.

Sends text and payload changes to the cloud.

The participant that calls this method should have:

To get the method call result use one of the following options:

  1. Specify the callback parameter to consume the results with MessageEvent or ErrorEvent in case of success/error accordingly.
  2. Implement the MessengerListener.onEditMessage and MessengerListener.onError events.

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

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

Parameters

  • text:

    String?

    Optional

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

  • payload:

    List<Map<String, Any>>?

    Optional

    New payload of this message. If null, message payload is not updated

  • Optional

    Callback to be called when the function completes

Returns

  • type:

    Unit

remove

Copy URL
fun remove(callback: 

MessengerCallback<MessageEvent>?

):

Unit

This API is in beta and subject to change.

Removes the message from the conversation.

The participant that calls this method should have:

To get the method call result use one of the following options:

  1. Specify the callback parameter to consume the results with MessageEvent or ErrorEvent in case of success/error accordingly.
  2. Implement the MessengerListener.onRemoveMessage and MessengerListener.onError events.

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

Parameters

Returns

  • type:

    Unit

Props

conversation

Copy URL
val conversation: 

String

This API is in beta and subject to change.

The UUID of the conversation this message belongs to.

Returns

  • type:

    String

payload

Copy URL
val payload: 

List<Map<String, Any>>?

This API is in beta and subject to change.

The list of payload objects associated with the message.

Returns

  • type:

    List<Map<String, Any>>?

text

Copy URL
val text: 

String?

This API is in beta and subject to change.

The text of this message.

Returns

  • type:

    String?

uuid

Copy URL
val uuid: 

String

This API is in beta and subject to change.

The universally unique identifier (UUID) of the message.

Returns

  • type:

    String

sequence

Copy URL
val sequence: 

Long

This API is in beta and subject to change.

The message sequence number in the conversation.

Returns

  • type:

    Long