When a document is updated in da-admin outside of da-collab, da-collab needs to be informed about this, so it can discard its state and trigger the editor to reload the content.
To find out if the change was made outside of da-collab, da-admin needs to look for the header x-da-initiator in the request. If this header is not set or does not have the value collab, the update comes from elsewhere and da-collab needs to be informed.
da-collab is informed by calling /api/v1/syncadmin?doc=${url} with the url of the document updated.
When a document is updated in da-admin outside of da-collab, da-collab needs to be informed about this, so it can discard its state and trigger the editor to reload the content.
To find out if the change was made outside of da-collab, da-admin needs to look for the header
x-da-initiator
in the request. If this header is not set or does not have the valuecollab
, the update comes from elsewhere and da-collab needs to be informed.da-collab is informed by calling
/api/v1/syncadmin?doc=${url}
with the url of the document updated.