Overview #
Update the content or properties of an existing message. This can only be used to modify messages created by the current viewer.
Vanilla JavaScript:
await window.CordSDK.thread.updateMessage(
'message-42',
{
content: [{ type: 'p', children: [{ text: 'An updated message content' }]}],
}
);
await window.CordSDK.thread.updateMessage(
'message-42',
{
content: [{ type: 'p', children: [{ text: 'An updated message content' }]}],
}
);
Copy
What this function returns #
A promise that resolves to true
if the operation succeeded or rejects if it failed.
Arguments this function takes #
messageID #
required
string
The ID of the message to update.
data #
required
ClientUpdateMessage
The data values to update. Any omitted values will be left at their current values.
This is an object with the following fields: