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

Private message unread count 0 for normal user #23977

Open
nishlashakya opened this issue Dec 17, 2021 · 27 comments · May be fixed by #31459
Open

Private message unread count 0 for normal user #23977

nishlashakya opened this issue Dec 17, 2021 · 27 comments · May be fixed by #31459
Labels
contrib: good first issue Issues that you can solve to start contributing :) hacktoberfest

Comments

@nishlashakya
Copy link

Description:

Steps to reproduce:

  1. call /api/v1/subscriptions.get
  2. response object has unread count 0 even if the channel has unread message

Expected behavior:

get the number of unread count from the channels

Actual behavior:

image

Server Setup Information:

  • Version of Rocket.Chat Server:
    rocket chat iframe integration
@dudanogueira dudanogueira added the contrib: good first issue Issues that you can solve to start contributing :) label Dec 29, 2021
@yksolanki9
Copy link

I wish to take up this issue. Please assign it to me

@nishlashakya
Copy link
Author

thanks @yksolanki9

@AbhishekJamhoriya
Copy link

Hi, @nishlashakya is this issue still open if yes, can you please assign me this issue.

@nishlashakya
Copy link
Author

I am not able to assign the issue. Can you please @dudanogueira ?

@nishlashakya
Copy link
Author

@dudanogueira hi! when can we expect this fix?

@try-catch-stack
Copy link
Contributor

Hey @nishlashakya
May I know what options are selected in the Unread count settings present in Administration > General .You can only change it if you have the admin rights of the server.

image

Because by default , it is set to user mentions only and hence the api will return unread count of only the messages in which you are mentioned. Changing it to All messages will return unread count of all messages.

@nishlashakya
Copy link
Author

hello @try-catch-stack I have tried by updating Unread count of DIrect Message to All messages. I only get the correct unread count for admin users and for normal users the unread count is still 0 even it has many unread messages.

@Manan17
Copy link

Manan17 commented Feb 10, 2022

Hi is this issue still open if yes, can you please assign me this issue.

@ankit-jha1210
Copy link

@nishlashakya can I work on this issue I might be able to fix this

@arunvigneshn
Copy link

Rocket chat version : 4.7.0

Hi @nishlashakya

This bug is the default configuration from the admin so only message count not getting updated for rooms, On changing the unread count setting from "User and Group mentions only" setting to "All" it works fine. And it works for both admin and normal users. it was also mentioned in the doc.

To change the settings
Administration -> General -> unread count drop down.
Change the "User and Group mentions only" to "All"

From docs -- link

reference

@SKB231
Copy link

SKB231 commented Jan 22, 2023

version no: Rocket Chat 6.0.0
Hi @nishlashakya
As @arunvigneshn said, I changed the setting from User and Group mentions only" to "All", for both "Unread count", and "Unread count for direct messages".
I tested it in my local environment and here is the response for "/api/v1/subscriptions.get", after having a test user send messages to 3 channel: 1 for private message, 1 for a group channel, 1 for another group channel, and it mentions the correct unread count for each.

{
    "update": [
        {
            "_id": "mYcceMFxrMKgxxx",
            ''''
            "**unread**": 2,
            "userMentions": 0,
            "groupMentions": 0,
            '''
        },
        {
            "_id": "kTSfc5MTYWtw8xxx",
            '''
            "**unread**": 3,
            "userMentions": 0,
            "groupMentions": 0,
            '''
        },
        {
            "_id": "5jsSkD8m2dTgxxx",
            '''
            "**unread**": 1,
            "userMentions": 0,
            '''
        }
    ],
    "remove": [],
    "success": true
} 

unread count for admin users and for normal users the unread count is still 0 even it has many unread messages.

It may be that the you were only checking it for one channel and not for another channel in the result.

@Gua00va
Copy link

Gua00va commented Feb 15, 2023

Hey!! I want to work on this issue. I'm new here so I'm really excited to start contributing. Please assign it to me.

@Rartg
Copy link

Rartg commented Mar 14, 2023

Send a message to a subscribed channel, but do not read it.
Call the /api/v1/subscriptions.get endpoint to get the subscription information for the channel.
Check the response object for the number of unread messages for the channel.

It should hit that !

@mfaraazahmed
Copy link

Hey Is this Issue solved? If not can you please assign this issue to me?

@Abhishek1274
Copy link

Hi, @nishlashakya if the issue is not yet resolved, can you please assign me this issue to contribute?

@hugocostadev
Copy link
Contributor

Guys, no need to ask for permission to fix the issue, feel free to work on it!
Just check if someone it's already raised a PR for that (should be linked in this issue).
Best of luck 🚀 👏


Questions? Help needed? Feature Requests?

Simer13 added a commit to Simer13/Rocket.Chat that referenced this issue Apr 20, 2023
RocketChat#23977
fixed the error where response object has unread count 0 even if the channel has unread message.
Simer13 added a commit to Simer13/Rocket.Chat that referenced this issue Apr 20, 2023
Simer13 added a commit to Simer13/Rocket.Chat that referenced this issue Apr 20, 2023
Response object has unread count 0 even if the channel has unread message.
@karthxk07
Copy link

I would like to work on this issue as my first, could I get it assigned to me please.

@coderboy-yash
Copy link

Hi, @nishlashakya is this issue still open I want to work on this issue.
Can you please assign this to me?

@SyedAbuBakerAli
Copy link

Hi, @nishlashakya is this issue still open I want to work on this issue.
Can you please assign this to me?

@BINDUVANI
Copy link

Can you please assign this to me ? i would love to work on it !

@lokesh-wagh
Copy link

I think this issue is resolved since the problem was with the configuration and not in the code

@nishlashakya @dudanogueira could you tell if this issue is still relevant and close it if it's not

@v-a14
Copy link

v-a14 commented Oct 24, 2023

Is this issue still open ?

@1aastha3
Copy link

Is this issue still open?

@Jatingupta9120
Copy link

I would love to work upon the issue, please assign this issue to me @dudanogueira

@ujjwal-goel
Copy link

Is this issue still open if yes, can you please assign me this issue?

@MUDITJAINN
Copy link

Is this issue still open, if yes could you please assign it to me?

@nikkivaddepelli
Copy link

I would like to work on this issue. Can you please assign this to me?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contrib: good first issue Issues that you can solve to start contributing :) hacktoberfest
Projects
None yet
Development

Successfully merging a pull request may close this issue.