delete

abstract suspend fun delete(message: Message, operationDescription: String? = null, operationMetadata: OperationMetadata? = null): Message

Delete a message in the chat room.

This method uses the Ably Chat API REST endpoint for deleting messages. It performs a soft delete, meaning the message is marked as deleted.

Should you wish to restore a deleted message, and providing you have the appropriate permissions, you can simply send an update to the original message. Note: This is subject to change in future versions, whereby a new permissions model will be introduced and a deleted message may not be restorable in this way. Spec: CHA-M9

Return

A promise that resolves to the deleted message.

Parameters

message
  • The message to delete.

operationDescription
  • Optional description for the delete action.

operationMetadata
  • Optional metadata for the delete action.