SIGN UP
Navigation

IMessage

Interface that represents message within a conversation.

Methods

String getConversation()

Get UUID of the conversation this message belongs to.

Returns

  • Return:

    String

    Conversation UUID

List<Payload> getPayload()

Get list of Payload objects associated with the message.

Returns

  • Return:

    List<Payload>

    List of Payload

String getSender()

Get user id of the sender of this message.

Returns

  • Return:

    String

    User id

long getSequence()

Get message sequence number.

Returns

  • Return:

    long

    Message sequence number

String getText()

Get text of this message.

Returns

  • Return:

    String

    Message text

String getUUID()

Get universally unique identifier of message. Can be used on client side for house keeping.

Returns

  • Return:

    String

    UUID of this message

void remove()

Remove the message. Triggers the IMessengerListener.onRemoveMessage(IMessageEvent) event for all messenger objects on all clients, including this one. Clients that are not connected will receive it later.

void update(String text, List<Payload> payload)

Sends text and payload changes to the server.

Parameters

  • text:

    String

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

  • payload:

    List<Payload>

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