Skip to main content

Introducing chat

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

The meeting.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 com.cloudflare.realtimekit.chat.ChatMessage.

We support three types of chat messages:

  • Text Message
class TextMessage(
userId: String,
displayName: String,
read: Boolean,
pluginId: String?,
val message: String,
time: String,
createdAtMillis: Long,
targetUserIds: List<String>?,
): ChatMessage(...)
  • Image Message
class ImageMessage(
userId: String,
displayName: String,
read: Boolean,
pluginId: String?,
val link: String,
time: String,
createdAtMillis: Long,
targetUserIds: List<String>?,
): ChatMessage(...)
  • File Message
class FileMessage(
userId: String,
displayName: String,
read: Boolean,
pluginId: String?,
val name: String,
time: String,
createdAtMillis: Long,
val link: String,
val size: Long,
targetUserIds: List<String>?,
): ChatMessage(...)