SwellRT / swellrt

SwellRT main project. Server, JavaScript and Java clients
http://swellrt.org/
Apache License 2.0
234 stars 34 forks source link

Questions about logged in users or participants #227

Closed ngwaitat closed 6 years ago

ngwaitat commented 7 years ago
  1. When calling the collaboration object's getParticipants(), I got this error:

Uncaught (in promise) RangeError: Maximum call stack size exceeded

  1. server.listLogin() always return only the currently logged in user. e.g. if I logged in 'tom' in Chrome and 'mary' in Firefox, Chrome side only report has 'tom' and Firefox side report only 'mary'. Should have both?

  2. Is there a method returning the user ids that opened a particular collaborative object? getParticipants() I suppose returns the possible user ids that allow access that object, while listLogin() returns user ids that currently logged in regardless of which object opened. And would there be listener on the collaborative object when a user is opened/closed it?

Thank you very much!

pablojan commented 6 years ago

oops, 1. is a bug. Ready to be fixed in version 1.0.4-beta (during today Monday)

server.listLogin() always return only the currently logged in user. e.g. if I logged in 'tom' in Chrome and 'mary' in Firefox, Chrome side only report has 'tom' and Firefox side report only 'mary'. Should have both?

This behavior is correct. ListLogin() returns all the users logged in the same browser instance in different tabs, even they have been closed. You can think in this feature as in google, where you can have multiple sessions in the same browser and switch between them in different tabs of the same browser.

Is there a method returning the user ids that opened a particular collaborative object? getParticipants() I suppose returns the possible user ids that allow access that object, while listLogin() returns user ids that currently logged in regardless of which object opened. And would there be listener on the collaborative object when a user is opened/closed it?

No. I guess you mean to have a presence feature. It is planed in the short term roadmap.

Thank you very much!

ngwaitat commented 6 years ago

Thank you for your answers :+1: