I am using automerge v2.2.4 to sync docs across multiple clients. I am not using the automerge-repo FYI. So I came across the following problem while generating a SyncMessage to share over the network:
In the example bellow dummyChanges is a list of all changes perform to the document.
However these changes are not included in the msg generated by the automerge.generateSyncMessage function. msg is not nil it just does not include any changes.
const dummyDoc = automerge.change(automerge.from(
{content: ""}), doc => { doc.content = "dummy" })
console.log("document to be sent is: ", dummyDoc)
const dummyChanges = automerge.getAllChanges(dummyDoc)
console.log(dummyChanges)
let dummyState = automerge.initSyncState()
let msg: Uint8Array | null = null;
[dummyState, msg] = automerge.generateSyncMessage(dummyDoc, dummyState)
if (msg) {
console.log("the decoded message is: ")
console.log(automerge.decodeSyncMessage(msg))
}
Any idea ?
I am not sure if I miss anything here, there is plenty of documentation out there (some of it outdated) so I am little bit confused regarding iff this is an issue ...
Hello team!
First things first, kudos for the project!
I am using automerge v2.2.4 to sync docs across multiple clients. I am not using the automerge-repo FYI. So I came across the following problem while generating a SyncMessage to share over the network:
In the example bellow
dummyChanges
is a list of all changes perform to the document. However these changes are not included in themsg
generated by theautomerge.generateSyncMessage
function.msg
is not nil it just does not include any changes.Any idea ?
I am not sure if I miss anything here, there is plenty of documentation out there (some of it outdated) so I am little bit confused regarding iff this is an issue ...
Cheer, C.