On this page

Restore messages

If you delete a message, you can restore its content together with the attached files using the Restore() method.

This is possible, however, only if the message you want to restore was soft deleted (the soft parameter was set to true when deleting it). Hard deleted messages cannot be restored as their data is no longer available in Message Persistence.

Requires Message Persistence configuration

To manage messages, you must enable Message Persistence for your app's keyset in the Admin Portal and mark the Enable Delete-From-History option.

Method signature

This method has the following signature:

1message.Restore()

Input

This method doesn't take any parameters.

Output

An awaitable Task<ChatOperationResult>.

Sample code

Restore a previously soft deleted message with the 16200000000000001 timetoken.

1

Last updated on