Closed vwall closed 4 years ago
Which version of y-websocket are you using? Do you maintain your own y-websocket connector?
There was a recent change in y-protocols (hence the major release bump), that changed when awareness changes are fired.
Use the update
event instead of the change
event now when you want to listen to updates to send to other users.
Versions:
y-protocols@1.0.0
y-websocket@1.3.0
We use your y-websockt with a modified version of the server and utils.js. Mostly for auth and saving to Postgres.
I noticed the changes in the new y-protocols but it seems awareness.on('update') and awareness.on('change') mostly fire at the same time. You explain the difference in the docs about these two but it's going over my head for some reason :|
In that screen shot i'm logging both awareness.on('update') and awareness.on('change'). You can see both remove the user (3rd array type) with the clientID of 525835980 and never adds it back but CHANGE runs the update for that user.
Going to close this for now. I think it was user error on my part.
Not sure if this is a y-protocols issue or a y-websocket issue.
After upgrading y-protocols and y-websocket and YJS to the latest, users are removed from presence after 30 seconds and never added back. ClientID 525835980 is from another browser and REMOVED is triggered and an and UPDATE gets triggered later but never an ADDED.