function getRecentChatMessages
getRecentChatMessages(
limit?,
before?: ChatCursor
): ChatMessage[]

Returns the latest limit messages, or with before the limit messages just older than it, oldest first either way. limit is clamped to 1–100.

Parameters

optional
limit = DEFAULT_LIMIT
optional
before: ChatCursor

Return Type

Throws

APIException

500 when a row doesn't parse as a message.

Usage

import { getRecentChatMessages } from "api/services/chat-service.ts";