Class Message

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

Index

Constructors

constructor

  • new Message(message: string, payload: Array<Payload>): Message
  • Parameters

    • message: string
    • payload: Array<Payload>

    Returns Message

Accessors

conversation

  • get (): string
  • UUID of the conversation this message belongs to.

    Returns string

payload

  • get (): Array<Payload>
  • set (value: Array<Payload>): void
  • Array of 'Payload' objects associated with the message.

    Returns Array<Payload>

  • Array of 'Payload' objects associated with the message.

    Parameters

    • value: Array<Payload>

    Returns void

sender

  • get (): string
  • Returns string

seq

  • get (): number
  • Message sequence number.

    Returns number

text

  • get (): string
  • set (value: string): void
  • Message text.

    Returns string

  • Message text.

    Parameters

    • value: string

    Returns void

uuid

  • get (): string
  • Universally unique identifier of message. Can be used on client side for housekeeping.

    Returns string

Methods

remove

  • remove(): void
  • Remove the message. Triggers the RemoveMessage event for all messenger objects on all clients, including this one.

    Returns void

toCache

update

  • update(): void
  • Sends text and payload changes to the server.

    Returns void