ChatMessage
Properties
Property name | Data type | Required | Use |
---|---|---|---|
userId | string | Yes | Peer ID of the message sender |
displayName | string | Yes | Peer ID of the message sender |
pluginId | string | No | If this message is from a plugin, then the plugin id, otherwise null |
time | number | Yes | Unix timestamp (with millisecond precision) of the time when the message was sent |
type | Enum (MessageTypes) | Yes | Type of the message |
message | string | With text messages | The actual string representation of the message |
link | string | With image messages | Link to the image that is shared in the chat |
name | string | With file messages | Name of the file |
size | number | With file messages | Size of the file in bytes |
link | string | With file messages | Link to the file that is shared in the chat |
pollId | string | With poll messages | Unique ID of the poll |
MessageTypes
MessageTypes
is an enum that enumerates the different kind of chat messages
that are allowed to be exchanged between participants in a Dyte meeting, using
Dyte's chat functionality.
MessageTypes {
text,
image,
file,
poll
}
Type | Meaning |
---|---|
text | Chat message with text |
image | Chat message with image |
file | Chat message with any file other than image |
poll | A poll where the participants can choose an answer to a given question from the given list of options |