New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a new property "userID" to the "class ID" in the yjs rep #508
Comments
The |
Appreciate your reply @dmonad, I saw the discussion about The The problem of |
@dmonad - Basically the new suggested property |
This is what I will not add |
@dmonad - Appreciate your explanation, that's fine, we will implement and maintain the relationship between the |
Is your feature request related to a problem? Please describe.
We use
y-websocket
and trying to know which user did the change in theydoc.on("update")
event on the server, currently, theupdate
message data include theclient
which can get byY.decodeUpdate(update).structs[0].id.client
, but as the client value will be changed for the same user, so one user may have many client values, it is hard to track client value map to which user unless we persist all the data ofclient <> user
(too many data).Describe the solution you'd like
Add a new property
userID
to theclass ID
in theyjs rep
(utils/ID.js), ideally we can pass thisuserID
in the y.Doc constructor, every update message will include the userID likeid.client
property which fromcreateID function
, so we can get theuserID
from the update message easily, also thisuserID
can be used to highlight the change text as well(in theprosemirror-versions
rep/project).We need to persist all the historical update data, so include the
userID
in the update message will be very useful, especially when you check an old update as the client value already changed for that user, but the userID never change.The text was updated successfully, but these errors were encountered: