Message - Interface representing a message.

interface Message<C extends MessageContent> {
    avatar?: string;
    content: C;
    createdAt?: Date;
    deletedAt?: Date;
    self: boolean;
    type: string;
    updatedAt?: Date;
    username?: string;
}

Type Parameters

  • C extends MessageContent

    Type parameter for the content of the message.

Properties

avatar?: string

The avatar associated with the message (optional).

content: C

The content of the message.

createdAt?: Date

The creation date of the message (optional).

deletedAt?: Date

The deletion date of the message (optional).

self: boolean

Indicates whether the message is sent by the current user.

type: string

The type of the message.

updatedAt?: Date

The last update date of the message (optional).

username?: string

The username associated with the message (optional).