deleteMessage method

Future<DynamiteResponse<ChatDeleteMessageResponseApplicationJson, ChatChatDeleteMessageHeaders>> deleteMessage({
  1. required String token,
  2. required int messageId,
  3. ChatDeleteMessageApiVersion? apiVersion,
  4. bool? oCSAPIRequest,
})

Delete a chat message.

Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers. Throws a DynamiteApiException if the API call does not return an expected status code.

Parameters:

  • apiVersion Defaults to v1.
  • token
  • messageId ID of the message.
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

Status codes:

  • 200: Message deleted successfully
  • 202: Message deleted successfully, but Matterbridge is configured, so the information can be replicated elsewhere
  • 400: Deleting message is not possible
  • 403: Missing permissions to delete message
  • 404: Message not found
  • 405: Deleting message is not allowed

See:

Implementation

Future<DynamiteResponse<ChatDeleteMessageResponseApplicationJson, ChatChatDeleteMessageHeaders>> deleteMessage({
  required String token,
  required int messageId,
  ChatDeleteMessageApiVersion? apiVersion,
  bool? oCSAPIRequest,
}) async {
  final rawResponse = deleteMessageRaw(
    token: token,
    messageId: messageId,
    apiVersion: apiVersion,
    oCSAPIRequest: oCSAPIRequest,
  );

  return rawResponse.future;
}