Skip to content

Conversation

@abhinavkrin
Copy link
Member

@abhinavkrin abhinavkrin commented Jun 17, 2025

Proposed changes

Fixes the discrepancy in group member counts between the Rocket.Chat mobile and desktop apps. The counters endpoint for channels, direct messages, and groups has been updated to exclude deactivated users, aligning the behavior across platforms.
This PR RocketChat/Rocket.Chat#36236 will fix the members count in the counters endpoint used in the app.

Issue(s)

https://rocketchat.atlassian.net/browse/CORE-1205

How to test or reproduce

  1. Create a room with many users
  2. View the members count in RoomActionView
  3. Deactivate a user member without removing them from the room.
  4. View again the members count in RoomActionView. It should not include the deactivated users in the count.

Screenshots

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • Improvement (non-breaking change which improves a current function)
  • New feature (non-breaking change which adds functionality)
  • Documentation update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • I have signed the CLA
  • Lint and unit tests pass locally with my changes
  • I have added tests that prove my fix is effective or that my feature works (if applicable)
  • I have added necessary documentation (if applicable)
  • Any dependent changes have been merged and published in downstream modules

Further comments

SUP-739

@abhinavkrin abhinavkrin requested a review from diegolmello June 17, 2025 20:18
Copy link
Member

@diegolmello diegolmello left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the issue is the endpoint including deactivated users, why we should fix it with a reactivity refactor on client?
Shouldn't we fix the endpoint?

@abhinavkrin
Copy link
Member Author

abhinavkrin commented Jun 17, 2025

If the issue is the endpoint including deactivated users, why we should fix it with a reactivity refactor on client? Shouldn't we fix the endpoint?

Yes, I have created another PR that fixes the issue. RocketChat/Rocket.Chat#36236
But we will need to update the mobile reactivity too. Currently and Initially, mobile app do get the values from the counters endpoints. But it has also subscribed to room changes and sets the members counts to back to the Room.usersCount (it should have been the value from the endpoint).

Also, this pr also fixes to show room members from counters for the DMs

@diegolmello diegolmello force-pushed the fix/room-members-count-includes-deactive-users branch from a24f51e to 80f17ed Compare June 25, 2025 18:02
@diegolmello diegolmello changed the title fix: room members count includes deactivated users fix: room members count reactivity Jun 25, 2025
@diegolmello diegolmello merged commit b344622 into develop Jun 25, 2025
12 of 15 checks passed
@diegolmello diegolmello deleted the fix/room-members-count-includes-deactive-users branch June 25, 2025 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants