Skip to main content

getChatHistory

codebolt.chat.getChatHistory(): Promise<ChatMessage>
Retrieves the chat history from the server.

Returns:

 Promise<ChatMessage[ ]>
A promise that resolves with an array of ChatMessage objects representing the chat history.

Example

// Retrieve the chat history from the server
const chatHistory = await codebolt.chat.getChatHistory();

Explanation

This function basically helps us get all the previous messages from our Codebolt chats.