Message

interface Message

Represents a single message in a chat room.

Properties

Link copied to clipboard
abstract val action: MessageAction

The latest action of the message. This can be used to determine if the message was created, updated, or deleted. Spec: CHA-M10

Link copied to clipboard
abstract val clientId: String

The clientId of the user who created the message.

Link copied to clipboard
abstract val createdAt: Long

The timestamp at which the message was created.

Link copied to clipboard
abstract val headers: MessageHeaders

The headers of a chat message. Headers enable attaching extra info to a message, which can be used for various features such as linking to a relative point in time of a livestream video or flagging this message as important or pinned.

Link copied to clipboard

The metadata of a chat message. Allows for attaching extra info to a message, which can be used for various features such as animations, effects, or simply to link it to other resources such as images, relative points in time, etc.

Link copied to clipboard
abstract val operation: Message.Operation?

The details of the operation that modified the message. This is only set for update and delete actions. It contains information about the operation: the clientId of the user who performed the operation, a description, and metadata.

Link copied to clipboard

The reactions summary for this message.

Link copied to clipboard
abstract val roomId: String

The roomId of the chat room to which the message belongs.

Link copied to clipboard
abstract val serial: String

The unique identifier of the message. Spec: CHA-M2d

Link copied to clipboard
abstract val text: String

The text of the message.

Link copied to clipboard
abstract val timestamp: Long

The timestamp at which this version was updated, deleted, or created.

Link copied to clipboard
abstract val version: String

A unique identifier for the latest version of this message. Spec: CHA-M10a

Functions

Link copied to clipboard
fun Message.copy(text: String = this.text, headers: MessageHeaders = this.headers, metadata: MessageMetadata = this.metadata): Message
Link copied to clipboard