RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.04k stars 10.33k forks source link

Caching issue -- Problems when owner is removed from a team or channel and then added again #33162

Open scuciatto opened 2 weeks ago

scuciatto commented 2 weeks ago

Description:

There's a caching issue when a user is removed and then re-added to a room. If the user was an owner, after he is added back it shows as if he was still an owner. If you refresh the screen you will see that he is no longer an owner (which is the correct behavior)

Steps to reproduce:

  1. Add a new admin user to a channel or team.
  2. Remove the user.
  3. Add the user back, When adding it back, the user is still shown as an owner.

Expected behavior:

The user should not be shown as an owner.

Actual behavior:

The user is shown as an owner

https://github.com/user-attachments/assets/29e53091-b510-4762-acec-09babbc3b916

Lovakush commented 1 week ago

@scuciatto I am working on the caching issue where a removed and re-added user is incorrectly shown as an owner until the page is refreshed.

I have a few clarifications:

  1. When the user is re-added, the "Remove Owner" button appears, but should it display "Set as Owner" instead?
  2. If "Remove Owner" is clicked, it correctly shows that the user is not an owner. Is this the expected behavior?
  3. After refreshing the page, everything appears as expected, correct?
  4. Should the "Set as Owner" button appear immediately after re-adding the user, without requiring a refresh?