While reviewing apps/meteor/server/methods/getUsersOfRoom.ts, I noticed an existing TODO indicating that deactivated users are currently being included in the total user count:
The current implementation counts subscriptions based on the existence of a username, which also includes users that have been deactivated. This results in the total value including users who should no longer be considered active members of the room.
Proposed direction (seeking confirmation before implementation):
- Update the total calculation to exclude deactivated users, in line with the existing TODO
- Ensure deactivated users are excluded from the count
- Keep total and records.length consistent
I’d be happy to work on this fix and submit a PR once the preferred approach is confirmed.