function deleteChatMessage
deleteChatMessage(
id: string,
requestingUserId: string,
canModerate: boolean
): void

Deletes a message on a chat_delete. canModerate lets a moderator delete anyone's message. Replies to it keep their replyToId, without its preview.

Parameters

id: string
requestingUserId: string
canModerate: boolean

Return Type

void

Throws

APIException

404 when there is no such message, 403 when the user is neither its author nor a moderator.

Usage

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