RocketChat / RocketChat/Rocket.Chat
Differences in unread message counters for groups (Client/REST-API)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
There seem to be some differences in the counting mechanisms for unread messages between the client and REST-API regarding groups.
Client:
The unread counter for groups does not consider system messages (like when a user is deleted from a group).
REST-API (https://developer.rocket.chat/api/rest-api/methods/groups/counters):
Receiving the number of unread messages for a user and a group via REST-API does consider system messages.
Steps to reproduce:
- Create a group with three users (A, B, C)
- Have user A remove user C from the group; Resulting in a system message (User C has been removed...)
- Write a message with user A in the group
- Check the unread counters of user B for the group
Expected behavior:
The logic for counting the unread messages should be the same. Either system messages are considered or not.
Actual behavior:
Unread counters of user B in the group:
- In client it shows a 1.
- Receiving the unread counter via REST-API for the user and group returns a 2.
Server Setup Information:
- Version of Rocket.Chat Server: 3.15.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 with the groups/counters REST API endpoint and reproduce the three-user group scenario described in the issue. Compare its unread count with the client count after the removal system message and subsequent user message; done means both paths consistently include or exclude system messages.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100