class BaseChatMessage

Represents some message in a chat conversation. This class is not meant to be used directly.

Constructor

constructor(data, bot)

Parameters

data: BaseChatMessageData

Data used to construct the message.

bot: Bot

The active Bot instance.

Properties

id: string

The message's ID.

conversationId?: string

The ID of the conversation the message belongs to.

senderDid: `did:${string}`

The DID of the message's sender.

sentAt: Date

When the message was sent.

Methods

getSender()

Fetch the profile of the user who sent this message.

getConversation()

Fetch the Conversation instance this message belongs to. Returns null if the conversation could not be found.

Returns

Promise<Conversation | null>