getMessagesBefore(accountId:chatId:before:)

Load messages older than a reference message

func getMessagesBefore(accountId: String, chatId: String, before: ChatMessage?) async -> Array<ChatMessage>

Parameters

accountId

the account to load messages for

chatId

Chat to query

before

return messages older than this message, or start from the newest when null

Return Value

Promise resolving to older messages