You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
TLDR: Is it possible to get filter changes returned by getChanges() according to the message in the changeOption? How is this done?
I have change messages assigned to each of the possible edits in my app, i.e.
// message 'update position'this.document=Automerge.change(this.document,'update position',doc=>{doc[posID].position=payload[1]})// and message 'add cable':this.document=Automerge.change(this.document,'add cable',doc=>{for(leti=0;i<doc[srcID].outputs.length;i++){// find the output in the doc matching the cable's srcif(doc[srcID].outputs[i].name==srcJack){if(!doc[srcID].outputs[i].connections[destID]){doc[srcID].outputs[i].connections[destID]={}}doc[srcID].outputs[i].connections[destID][destJack]=cableType}}})
These two document changes are handled quite differently in the app: the first one results in changes to a visual scene, while the second results in changes to both visuals and what is hear in the audio output.
I recently implemented the Automerge Sync protocol, which is working great. Each time a syncMessage has been received and processed, I want to run Automerge.getChanges() and get the change message per each change so that I can trigger the additional steps related to each edit type.
The text was updated successfully, but these errors were encountered:
Hi @michaelpalumbo, you can pass a change (the byte array) to Automerge.decodeChange() to get back a JSON representation that includes the message. Does that do what you need?
TLDR: Is it possible to get filter changes returned by getChanges() according to the message in the changeOption? How is this done?
I have change messages assigned to each of the possible edits in my app, i.e.
These two document changes are handled quite differently in the app: the first one results in changes to a visual scene, while the second results in changes to both visuals and what is hear in the audio output.
I recently implemented the Automerge Sync protocol, which is working great. Each time a syncMessage has been received and processed, I want to run Automerge.getChanges() and get the change message per each change so that I can trigger the additional steps related to each edit type.
The text was updated successfully, but these errors were encountered: