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

Favicon notification count not reflected in highlighted rooms (stuck badge count) #3060

Closed
Tracked by #3363
lukebarnard1 opened this issue Jan 25, 2017 · 18 comments · Fixed by matrix-org/matrix-react-sdk#3121
Labels
A-Notifications O-Occasional Affects or can be seen by some users regularly or most users rarely P2 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Cannot-Reproduce X-Needs-Info This issue is blocked awaiting information from the reporter

Comments

@lukebarnard1
Copy link
Contributor

For quite a while, I had a (1) next on my favicon. I clicked on all of my unread (bold name) rooms to see if was one of them, but it still hadn't disappeared. Then I clicked on all of my read rooms and one of them cleared the notification status on the favicon.

Sadly I didn't catch which room cleared it.

@ara4n ara4n changed the title Favicon notification count not reflected in highlighted rooms Favicon notification count not reflected in highlighted rooms (stuck badge count) Feb 18, 2017
@ara4n ara4n added T-Defect X-Cannot-Reproduce S-Major Severely degrades major functionality or product features, with no satisfactory workaround ui/ux P2 and removed X-Cannot-Reproduce labels Feb 18, 2017
@grahamperrin
Copy link

Not only the favicon; the count is (to me) more prominently in the title of the page.

Here, for example:

riot 1

– plus, I have the title visible in my main panel in KDE:

plasma-desktop

(Side note: whilst the red alert has disappeared, I have no recollection of reading any red text. It's disorienting.)

@jcahill
Copy link

jcahill commented May 7, 2017

I've had similar notification count problems. I doubt they need a new issue.

For me, the stuck count is recurring. On first description I stated that the value was always [2]. It now occasionally sticks at [1] as well. The [2] case always needs to decrement twice, never 2->0.

The offending rooms remain seemingly arbitrary, as do the most recent event types in those rooms.

In the screenshot below: count was [1], offender was #synapse-community. The room is muted.

riot-web_3060

First mention in #riot:

riot-web_3060-02

@MTRNord
Copy link
Contributor

MTRNord commented Jul 7, 2017

Hapens on my side too. On Android it doesn't happen. My room with stuck read counter is riot-android

@Nostradamos
Copy link

Happens to me too, clicking on some rooms solves the problem after a very short delay.

@aaronraimist
Copy link
Collaborator

I've had a 1 badge on my favicon that I can't get rid of for a few weeks now. Clear cache doesn't fix it. Where can I look to start debugging where this is happening?

It is there across all instances of Riot web/desktop but no other clients see it. No badge on Riot iOS and all rooms appear to be read in Riot and in other clients like Quaternion.

@aaronraimist
Copy link
Collaborator

aaronraimist commented Apr 30, 2019

@leprasmurf:chat.geekforbes.com found out a way to find rooms with notifications:

Enter

mxMatrixClientPeg.get().getRooms().forEach(function(element) {let count=element['_notificationCounts']['total']; if(count > 0) { console.log( element['name'] + ' (' + element['roomId'] + ') - ' +  count)}})

in the browser console and then click on the room that it spits out. Note, if it is an upgraded room you may need to view the old room, that’s probably where the notification is.

That let me find the room that "had the notification" even though it really didn't. Riot didn't display it with a badge next to it or even with the name written in bold. Viewing that room cleared the badge on my favicon.

@aaronraimist
Copy link
Collaborator

Seems like this has been happening a lot recently. I’ve helped several people who had the same problem and it seems like it was all notifications from rooms that had been upgraded.

@tgr
Copy link

tgr commented May 14, 2019

Happened to me recently. As far as I can tell the room wasn't upgraded (it's at version 1 now; none of the admins know much about Matrix). It's bridged (manually) to a Freenode IRC channel, not sure if that matters.

dbkr added a commit to matrix-org/matrix-react-sdk that referenced this issue Jun 19, 2019
This was using a separate function (in MatrixChat) that didn't
take into account whether we were supposed to be hiding the badge
for rooms so would include notifs that were hidden everywhere else.

Also make it a function & put it in RoomNotifs with all its friends.

Fixes element-hq/element-web#3060
@aaronraimist
Copy link
Collaborator

This should probably be reopened. I still regularly help people with this issue.

@jryans jryans reopened this Sep 4, 2019
@KB1RD
Copy link

KB1RD commented Oct 1, 2019

Here is a bit of code to clear all unread notifications:

(function(mx){mx.getRooms().forEach(function(element){const count=element['_notificationCounts']['total']; if(count > 0) {mx.sendReadReceipt(function(evs) {return evs[evs.length - 1]}(element.getLiveTimeline()._events), {})}})})(mxMatrixClientPeg.get())

... and the slightly easier to read version...

(function(mx) {
    mx.getRooms().forEach(function(element) {
        const count = element['_notificationCounts']['total'];
        if (count > 0) {
            mx.sendReadReceipt(function(evs) {
                return evs[evs.length - 1]
            }(element.getLiveTimeline()._events), {})
        }
    })
})(mxMatrixClientPeg.get())

It might be nice to have a UI button somewhere to clear all notifications. I think @aaronraimist mentioned putting this near the clear cache button. I put a javascript: URL on my bookmarks bar in the mean time.

@dbkr
Copy link
Member

dbkr commented Oct 23, 2019

Looks like one source of this is notifications in previous versions of rooms.

@turt2live
Copy link
Member

the previous room versions bug is a result of #7843, not this issue. There is UI for exposing notifications in old rooms, but due to a mix of server-side resets and Riot cache problems the "previous" room can be lost so the UI doesn't show up.

@aaronraimist
Copy link
Collaborator

Got this again with the new wave of +matrix:matrix.org upgrades. Was the old Synapse Announcements room !qBFNwucQebGPQldAnq:matrix.org which didn't even have any new messages...

@aklys
Copy link

aklys commented Nov 24, 2019

Experienced this with it sticking around for about 5 months. Was given the javascript workaround which cleared it up.

@Flexmaen
Copy link

The whole notification part does not werk very well for me in Riot-Web. Most of the time I can't figure out why I got the notification. Luckily I got Riot on Android, where I get a notification of the exact message.

@jryans jryans removed the Z-UI/UX label Mar 9, 2021
@kittykat kittykat added O-Occasional Affects or can be seen by some users regularly or most users rarely S-Major Severely degrades major functionality or product features, with no satisfactory workaround and removed S-Major Severely degrades major functionality or product features, with no satisfactory workaround Z-Room-Upgrade-2019 labels Aug 4, 2021
@novocaine
Copy link
Contributor

@aaronraimist are you still seeing instances of this issue coming up?

@SimonBrandner SimonBrandner added the X-Needs-Info This issue is blocked awaiting information from the reporter label Aug 19, 2021
@aaronraimist
Copy link
Collaborator

@novocaine no I have not seen this in a while

@novocaine
Copy link
Contributor

Okay! Just ping here if it starts coming up again please, closing for now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Notifications O-Occasional Affects or can be seen by some users regularly or most users rarely P2 S-Major Severely degrades major functionality or product features, with no satisfactory workaround T-Defect X-Cannot-Reproduce X-Needs-Info This issue is blocked awaiting information from the reporter
Projects
None yet
Development

Successfully merging a pull request may close this issue.