deleteMessage method
Future<DynamiteResponse<ChatDeleteMessageResponseApplicationJson, ChatChatDeleteMessageHeaders> >
deleteMessage({
- required String token,
- required int messageId,
- ChatDeleteMessageApiVersion? apiVersion,
- 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 tov1
.token
messageId
ID of the message.oCSAPIRequest
Required to be true for the API request to pass. Defaults totrue
.
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:
- deleteMessageRaw for an experimental operation that returns a
DynamiteRawResponse
that can be serialized.
Implementation
Future<_i1.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;
}