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
@Joeao Cphyc and me were working on a special user-manager for y-richtext that also handled cursors for all the users.
In order to listen to userEvents (join / leave), you can call:
y.connector.onUserEvent(function (event) {
console.log(event.action) // 'userLeft' or 'userJoined'
})
y.connector.connections maintains all the connections, and therefore provides a list of users.
But when you use y-websockets-connector, you'll just see one entry - and that's the y-websockets-server.
For yjs > 0.7 I don't plan to provide sophisticated userManagement directly in Yjs anymore. There are just too many cases that need to be covered for different connectors (think about federated ones, or a loosely connected network). And it's never going to fit all use cases. In some cases you don't even want to share the user data between all the users. So I really want to leave that to the application designer.
For the far future, however, I plan to implement something like a userManagement type that can manage things like assign names, set cursors, share data that only one user can modify.
For these reasons I'm going to close this issue here now. Please, feel free to open an issue for questions/discussion on this topic in [y-js/yjs].
As a user, I would like to have a list of events triggered by other peers (join / leave / change name).
The text was updated successfully, but these errors were encountered: