RocketChat / RocketChat/Rocket.Chat
API: Incorrect usersCount from response
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
The usersCount value returned from several endpoints appears incorrect. The value does not match the total member count retrieved from rooms.membersOrderedByRole.
Steps to reproduce:
- Call the
channels.countersendpoint for a specific channel. - Compare the
usersCountfrom the above endpoints with the member count retrieved fromrooms.membersOrderedByRole.
Expected behavior:
The usersCount value from channels.counters, rooms.info, method.call/getRoomByTypeAndName, and directory should match the total count of members from rooms.membersOrderedByRole.
Actual behavior:
The usersCount from these endpoints is inconsistent and does not match the total retrieved from rooms.membersOrderedByRole.
Screenshot
Server Setup Information:
- Version of Rocket.Chat Server: 7.4.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how usersCount is produced for channels.counters, rooms.info, method.call/getRoomByTypeAndName, and directory, then compare each result with rooms.membersOrderedByRole. Confirm the expected count semantics and check existing coverage around these endpoints. Done means all named endpoints consistently report the total member count.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100