jech / galene

The Galène videoconference server
https://galene.org
MIT License
900 stars 119 forks source link

Update protocol.js #131

Closed jvanveen closed 2 years ago

jvanveen commented 2 years ago

The data part of the message was not accessible in onJoined (change)

jech commented 2 years ago

Hmm... onuser does not take the permissions and data, they are dumped in the user data structure, which is stored in the ServerConnection.users field. See here: https://github.com/jech/galene/blob/master/static/galene.js#L2099

I'm not too keen on adding extra arguments to the callback; I'd much rather pass the user data structure to the callback. I'd also want to restyle the onjoined callback to use a similar style.

jvanveen commented 2 years ago

Thanks, I forgot about connection.user. It didn't make much sense to add those extra parameters. Instead I'll just read connection.user from within the onuser.