Closed tjhorner closed 5 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?
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.
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!
(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.)
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:
Not sure about that. Could be everyone can see them.
Hm, I went on a random server and I couldn't access registered users.
Could be the 'register user' permission affects it.
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.