Skip to content

API call users.setStatus does not trigger status update of clients #18587

@stylefish

Description

@stylefish

Description:

when calling user.setStatus via API the status of the user is correctly reflected to himself but it does not update for others until the user.setStatus method is called again or the other client is reloaded.

Steps to reproduce:

  1. call REST API user.SetStatus with a status other than the current, i used the following payload to set another users status:
{
	"status": "busy",
	"message":"",
	"userId": "ABCDE"
}

the status is then update for the user user directly:
image
but not for others, for them "max" (ABCDE) is online:
image

when i change "message" in another request afterwards and keep the status the same, all clients get refreshed.
payload:

{
	"status": "busy",
	"message":"1",
	"userId": "ABCDE"
}

this behavior is reproducible every time.

Expected behavior:

When the status is changed via API the UI of others should reflect that.

Actual behavior:

The UI of others is unchanged until the client is restarted or the page is refreshed

Server Setup Information:

  • Version of Rocket.Chat Server: 3.5.2
  • Operating System: Debian 9 x64
  • Deployment Method: rocketchatctl
  • Number of Running Instances: 1
  • DB Replicaset Oplog: Enabled
  • NodeJS Version: 12.18.2
  • MongoDB Version: 4.0.19

Client Setup Information

  • Desktop App or Browser Version: Desktop App 2.17.11, current FF, Chrome
  • Operating System: Windows 10 x64

Additional context

with a change of message afterwards all clients get refreshed.

Relevant logs:

at the time of the change there are not error messages in the server log nor in the browser F12 console

Metadata

Metadata

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