Transaction meta not sent to other clients

I’ve noticed that the Transaction.meta map (yjs/Transaction.js at ea4e9a0007a7d19ee913647f47b17aebd08bdef1 · yjs/yjs · GitHub) is not populated when a transaction is received by other connected clients – some screenshots to illustrate:

Client A (originating the change) – meta map is populated with one entry:

Client B (receiving the change) – meta map is empty:

Is this intentional? I would like to use the meta field in order for semantic information about the transaction (what type of user action instigated it) to be transmitted so that receiving clients can interpret the changes accordingly. Is there another way I should achieve this type of behavior?

Hi @piers,

Meta information and the origin parameter are only for the local Yjs instance. The content is not propagated to other clients. It is intended to coordinate editor bindings and local application state.

We also won’t be able to sync this kind of information in the future because transactions are often merged with other changes (this could happen on the server, or if the client has a delayed sync). We also don’t want to store transactions individually (that would be unperformant).

If you want a behavior like this, you could add “meta” information to the updates that are propagated to other clients. This would require you to build a custom provider. Fortunately, the update protocol is fairly simple:

I see, makes sense – thanks for the detailed follow up!