Skip to main content

Introduction

The meeting chat object is stored in dyteClient.chat, which has methods for sending and receiving messages. There are 3 types of messages that can be sent in chat - text, images, and files.

The dyteClient.chat.messages array contains all the messages that have been sent in the chat. This is an array of objects, where each object is of type DyteChatMessage.

The DyteChatMessage class has the following properties:

  • userId : UserID of the sender.
  • displayName : Display name of the sender.
  • read : Boolean whether the message is read or not.
  • pluginId : Plugin ID of the message.
  • type : DyteMessageType for type of message being sent (whether DyteMessageType.text, DyteMessageType.image or DyteMessageType.file).

There are 3 message classes that extends DyteChatMessage, and each has some extra parameter apart from DyteChatMessage ones:

  • DyteTextMessage
  • DyteImageMessage
  • DyteFileMessage

DyteTextMessage:

  • message: Text message sent.

DyteImageMessage:

  • link: URL to the bucket where the image is stored.
  • fileUri: Local path URL of image selected.
  • fileName: Name of image selected.

DyteFileMessage:

  • name: Name of the file to be sent.
  • fileUri: Local path URL of the file selected.