Idempotently setting the initial document content (with webrtc

Hey @sgrove, I gave a solution to this problem here: Initial offline value of a shared document

I recommend to store the Yjs document instead of a pure text representation. If you store the Yjs document, you can guarantee that all clients always sync and you avoid many complex cases that you would need to fix in your protocol.

In short: If you receive the text content from some server that updates the text representation, you should rather store the Yjs document on the server (maybe alongside the text representation).