v7.3.0

ChatMessageModel

A model representing a single message in the ChatPanel widget. Each message has a text body, a direction indicator (fromOther), and optional interactive elements like user-selectable option buttons.

const message = new ChatMessageModel({
    text      : 'Hello, how can I help?',
    fromOther : true,
    options   : ['Option A', 'Option B']
});

See also

No results

Fields

Fields belong to a Model class and define the Model data structure
  • A boolean indicating the source of the message. true if it's a remote message, false for a local message

  • An array of strings to present to the user in the UI. After user picks a value, the conversation can continue.

  • The message text

  • The timestamp of this message

Properties

Properties are getters/setters or publicly accessible variables on this class

Source path

Core/data/ChatMessageModel.js

Contents