Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected behaviour in im.counters endpont API #33301

Closed
e-o-j opened this issue Sep 17, 2024 · 13 comments · Fixed by #34109
Closed

Unexpected behaviour in im.counters endpont API #33301

e-o-j opened this issue Sep 17, 2024 · 13 comments · Fixed by #34109
Labels
Tasked Added to the internal issue tracking

Comments

@e-o-j
Copy link

e-o-j commented Sep 17, 2024

Description:

When querying the im.counters endpoint for a user that has never entered the chat, the unreads counter returns null instead of the total number of messages in the room.

Steps to reproduce:

  1. Open a direct message conversation between two users
  2. Send some messages from one of the users
  3. Query the im.counters endpoint with the userId of the other user of the conversation

Expected behavior:

The unreads variable shows the same number of messages as the msgs variable.

Actual behavior:

The unreads variable returns null

Server Setup Information:

  • Version of Rocket.Chat Server: 6.10.2
  • License Type: Community
  • Number of Users: 479
  • Operating System: Debian 12 (bookworm)
  • Deployment Method: docker
  • Number of Running Instances: 1
@reetp
Copy link

reetp commented Sep 17, 2024

Version of Rocket.Chat Server: 6.10.2

Have you tested on latest?

Please do and let us know.

Copy link
Contributor

github-actions bot commented Oct 3, 2024

This issue has been marked as stale because there has been no further activity in the last 10 days. If the issue remains stale for the next 4 days (a total of 14 days with no activity), then it will be assumed that the question has been resolved and the issue will be automatically closed.

@github-actions github-actions bot added the stat: no response Issue with no response after a given time label Oct 3, 2024
@e-o-j
Copy link
Author

e-o-j commented Oct 7, 2024

Version of Rocket.Chat Server: 6.10.2

Have you tested on latest?

Please do and let us know.

I have just tested in latest version (6.12.1) and the error persist:

{
  "joined": true,
  "members": 2,
  "unreads": null,
  "unreadsFrom": null,
  "msgs": 1,
  "latest": "2024-10-07T08:28:23.875Z",
  "userMentions": 0,
  "success": true
} 

@github-actions github-actions bot removed the stat: no response Issue with no response after a given time label Oct 7, 2024
Copy link
Contributor

This issue has been marked as stale because there has been no further activity in the last 10 days. If the issue remains stale for the next 4 days (a total of 14 days with no activity), then it will be assumed that the question has been resolved and the issue will be automatically closed.

@github-actions github-actions bot added the stat: no response Issue with no response after a given time label Oct 21, 2024
@reetp
Copy link

reetp commented Oct 23, 2024

I have just tested in latest version (6.12.1) and the error persist:

There is 6.12.2 (you really should upgrade) and 6.13.0 and 7.0-rc

Latest literally means that. For you test on 6.13 or 7.0

@github-actions github-actions bot removed the stat: no response Issue with no response after a given time label Oct 23, 2024
@e-o-j
Copy link
Author

e-o-j commented Oct 31, 2024

I've just tested in 6.13.0 and 7.0.0-rc.6 (the latest versions a the time of writing this comment) and get the same result in both scenarios.

Copy link
Contributor

This issue has been marked as stale because there has been no further activity in the last 10 days. If the issue remains stale for the next 4 days (a total of 14 days with no activity), then it will be assumed that the question has been resolved and the issue will be automatically closed.

@github-actions github-actions bot added the stat: no response Issue with no response after a given time label Nov 14, 2024
@e-o-j
Copy link
Author

e-o-j commented Nov 20, 2024

This is still relevant

@reetp
Copy link

reetp commented Nov 20, 2024

for a user that has never entered the chat

At a guess you have to have entered a chat before you can know what's in it?

@github-actions github-actions bot removed the stat: no response Issue with no response after a given time label Nov 20, 2024
@e-o-j
Copy link
Author

e-o-j commented Nov 20, 2024

But from an integrations point of view, if I as a user query the im.counters endpoint to see how many messages I have unread, getting a null from a chat that has unread messages is confusing i think

@reetp reetp added Tasked Added to the internal issue tracking and removed stat: waiting response labels Nov 20, 2024
@reetp
Copy link

reetp commented Nov 20, 2024

I'll refer it to the team but I'm not sure there'll be a rush to look at it.

@casalsgh
Copy link
Contributor

Taking for internal review from engineering

@scuciatto
Copy link
Member

We have confirmed the bug on our end. We will address the fix internally.
Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tasked Added to the internal issue tracking
Projects
None yet
4 participants