Forcing yjs to pick updates from one document over the other

Hi,

While merging two documents, is it possible to force yjs to pick change from one document over the other? I tried setting clientID of document I want to take precedence to a higher value than that of the other. But it doesn’t seem to consistently work. Is there a way force it?

thanks,

If it’s possible, it would involve a change to the core integrate method. Probably around here:

It is doing clientId comparisons in at least some of the cases, but I’m not intimate enough with the code to know its behavior in general.

Thanks for your reply Raine. I’ll dig around this part of the code. if it’s not just clientID, it must also be lamport clock.