Update thread properties

Change the properties of an existing thread


Overview #

Update an existing thread with new data.
await window.CordSDK.thread.updateThread('my-awesome-thread-id', {
  name: 'A more awesome name',
  resolved: true,
});
Copy

What this function returns #

A promise that resolves to true if the operation succeeded or rejects if it failed.

Arguments this function takes #


threadID #

required
string
The ID of the thread to update.

data #

required
ClientUpdateThread
The data values that should be updated.

This is an object with the following fields:


resolved #

optional
boolean
Whether the thread is resolved. Setting this to true is equivalent to setting resolvedTimestamp to the current time, and setting this to false is equivalent to setting resolvedTimestamp to null.

name #

optional
string
The name of the thread. This is shown to users when the thread is referenced, such as in notifications. This should generally be something like the page title.

metadata #

optional
EntityMetadata
Arbitrary key-value pairs that can be used to store additional information.

url #

optional
string
A URL where the thread can be seen. This determines where a user is sent when they click on a reference to this thread, such as in a notification, or if they click on a reference to a message in the thread and the message doesn't have its own URL.

extraClassnames #

optional
string | null
An optional space separated list of classnames to add to the thread.

Ask Cordy