diff --git a/README.md b/README.md index 1617b27e..5237c953 100644 --- a/README.md +++ b/README.md @@ -286,7 +286,7 @@ The return of this call will be the deleted message, as it would appear to other This is a _soft delete_ and the message will still be available in the history, but with the `deletedAt` property set. ```ts -const deletedMessage = await room.messages.delete(message); +const deletedMessage = await room.messages.delete(message, { description: 'This message was deleted for ...' }); ``` ### Subscribing to incoming messages diff --git a/src/react/README.md b/src/react/README.md index eb6a38c3..1320d6ad 100644 --- a/src/react/README.md +++ b/src/react/README.md @@ -197,7 +197,7 @@ import { Message } from '@ably/chat'; const MyComponent = () => { const { send, get, deleteMessage } = useMessages(); - + const [message, setMessage] = useState; const handleGetMessages = () => { // fetch the last 3 messages, oldest to newest get({ limit: 3, direction: 'forwards' }).then((result) => console.log('Previous messages: ', result.items)); @@ -208,14 +208,14 @@ const MyComponent = () => { }; const handleDeleteMessage = (message: Message) => { - deleteMessage(message, { description: 'deleted by user', hard: false }); + deleteMessage(message, { description: 'deleted by user' }); }; return (
- +
); };