Rantanen / node-mumble

Mumble client in Node.js
MIT License
155 stars 48 forks source link

MumbleClient.users() not returning users online #70

Closed tjhorner closed 5 years ago

tjhorner commented 8 years ago

MumbleClient#users() doesn't return the list of users currently online, rather all users that have been on the server when the client has been connected regardless if the user is offline or online.

Prior99 commented 8 years ago

Maybe add a MumbleClient.usersOnline() and MumbleClient.usersOffline() method as well as a property "online" to the user objects instead of changing the behaviour of this method?

tjhorner commented 8 years ago

Maybe add a MumbleClient.usersOnline() and MumbleClient.usersOffline() method as well as a property "online" to the user objects instead of changing the behaviour of this method?

Yes, this seems like the best solution instead of making breaking changes.

Rantanen commented 8 years ago

In terms of keeping the API clean and logical, I wouldn't consider this breaking change. The session IDs, etc. are wrong anyway for disconnected users. If the application needs to keep track of all the possible users, they should persist them somewhere.

.. and how did I miss the original issue posted October 18th? This completely went past me. Sorry for that!

Rantanen commented 8 years ago

(I'd be okay with usersOnline() and usersOffline() if users() returned -all- the registered users from the server. Even the ones who haven't logged on at all.)

Returning users the client has seen is just iffy.

(On the other hand: While fixing this, I think we should also include a method to retrieve all registered users in case the bot account has necessary permissions for that.)

tjhorner commented 8 years ago

While fixing this, I think we should also include a method to retrieve all registered users in case the bot account has necessary permissions for that.

Does a user require a special permission to view all registered users? I'm not seeing any ACL for that:

image

Rantanen commented 8 years ago

Not sure about that. Could be everyone can see them.

tjhorner commented 8 years ago

Hm, I went on a random server and I couldn't access registered users.

Rantanen commented 8 years ago

Could be the 'register user' permission affects it.