countMessages

Counts the total number of messages within a specific conversation.

Usage

const conversationHash = '0x...';
const numberOfMessages = await chat.countMessages(conversationHash);

Returns

Promise<bigint>

A promise that resolves to the total number of messages for the specified conversation.

Parameters

conversationHash

  • Type ConversationHash

The hash identifier of the target conversation for which the message count is being fetched.

Previous
calculateConversationHash