Skip to content
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

Notifications for user joining / leaving / changing their name, … #87

Closed
cphyc opened this issue Apr 24, 2015 · 2 comments
Closed

Notifications for user joining / leaving / changing their name, … #87

cphyc opened this issue Apr 24, 2015 · 2 comments

Comments

@cphyc
Copy link
Contributor

cphyc commented Apr 24, 2015

As a user, I would like to have a list of events triggered by other peers (join / leave / change name).

@Joeao
Copy link

Joeao commented Jan 13, 2016

Would this not be an issue outside of y-richtext? Perhaps bound to specific connectors or YJS as a whole?

@dmonad
Copy link
Contributor

dmonad commented Jan 13, 2016

@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].

@dmonad dmonad closed this as completed Jan 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants