Skip to content

getUsersOfRoom online users filter should work as expected #14737

@Galatoni

Description

@Galatoni

Description:
After the most recent upgrade (though granted we were previously on 74), the getUsersOfRoom websocket endpoint no longer works as expected. For example, when making a call including a room ID and setting the filter bool to true, the response now only includes online users regardless of the state of the filter. This means that populating some aspects of our custom implementation of the interface will have to be considerably changed before we can adopt the latest version.

Steps to reproduce:

  • Make a call to the getUsersOfRoom to a known room ID with the online flag set either way
  • Ensure at least some users are offline
  • Observe that the response is the same regardless of how the flag is set

Actual behavior:
Outbound message:
{"msg":"method","method":"getUsersOfRoom","id":"3rW7tZg04","params":["GENERAL",true]}
Result:
{"msg":"result","id":"3rW7tZg04","result":{"total":204,"records":[{"_id":"v52CM3QPvZeu6XzWr","name":"Aron Jarvis","username":"aron.jarvis"}]}}

Note that there was another participant in that target room who was offline

This is the same for direct message rooms as well as channels.

Server Setup Information:
Version of Rocket.Chat Server: 1.1.1
Operating System: Ubuntu: Welcome to Ubuntu 16.04.5 LTS (GNU/Linux 4.4.0-142-generic x86_64)
Deployment Method: custom ansible using tarball
Number of Running Instances: 1
NodeJS Version: v8.16.0
MongoDB Version: v4.0.10

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions