SIGN UP

Message

Describes single message. Received via the 'onSendMessage' or 'onEditMessage' events and used to serialize or edit the message.

Methods

remove(): void

Remove the message. Triggers the MessengerEvents.RemoveMessage event for all messenger objects on all clients, including this one.

Returns

  • Return:

    void
toCache(): SerializedMessage

Serialize message so it can be stored into some storage (like IndexedDB) and later restored via Messenger.createMessageFromCache

Returns

update(): void

Sends text and payload changes to the server.

Returns

  • Return:

    void

Properties

conversation: string

UUID of the conversation this message belongs to.

payload: Array<Payload>

Array of 'Payload' objects associated with the message.

sender: string
seq: number

Message sequence number.

text: string

Message text.

uuid: string

Universally unique identifier of message. Can be used on client side for housekeeping.