Rate this page:

Message

Class that represents a message within a conversation.

Methods

remove

Copy URL
fun remove(callback: 

MessengerCallback<MessageEvent>?

):

Unit

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

toString

Copy URL
fun toString(): 

String

Returns

  • type:

    String

update

Copy URL
fun update(text: 

String?

,
payload:

List<Map<String, Any>>?

,
callback:

MessengerCallback<MessageEvent>?

):

Unit

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

  • payload:

    List<Map<String, Any>>?

    Optional

    New payload of this message.

  • Optional

    Callback to be called when the function completes

Returns

  • type:

    Unit

Props

conversationUuid

Copy URL
val conversationUuid: 

String

The UUID of the conversation this message belongs to.

Returns

  • type:

    String

payload

Copy URL
val payload: 

List<Map<String, Any>>?

The list of payload objects associated with the message.

Returns

  • type:

    List<Map<String, Any>>?

sequence

Copy URL
val sequence: 

Long

The message sequence number in the conversation.

Returns

  • type:

    Long

text

Copy URL
val text: 

String?

The text of this message.

Returns

  • type:

    String?

uuid

Copy URL
val uuid: 

String

The universally unique identifier (UUID) of the message.

Returns

  • type:

    String