deleteMessage

Deletes a specific message from an existing conversation identified by a conversation hash.

Usage

const conversationHash = '0x...';
const messageIndex = 1n;
const txResponse = await chat.deleteMessage(conversationHash, messageIndex);

Returns

Promise<EthereumTransactionResponse>

A promise that resolves to the response from the sendTransaction method on the walletClient provided by the developer on Chat initialization.

Parameters

conversationHash

  • Type ConversationHash

The unique identifier (hash) of the target conversation from which the message will be deleted.

index

  • Type bigint

The position or index of the message you want to delete from the specified conversation. Make sure the index corresponds to the exact position of the message within the conversation.

Previous
addMessageToConversation