element-desktop icon indicating copy to clipboard operation
element-desktop copied to clipboard

Desktop notification isn't closed after message is read in app (on Gnome)

Open p-fischer opened this issue 5 months ago • 4 comments

Steps to reproduce

  1. I receive a new message and a desktop notification is displayed
  2. I open the app via the dock icon (not via the notification)
  3. I read the message

Outcome

What did you expect?

I'd expect that the app tracks the relation between message a notification and withdraws/closes the notification related to the message once the message is read. (Apparently, Gnome uses the Freedesktop Notifications specification, which supports closing notifications.)

What happened instead?

The desktop notification persists. Desktop notifications accumulate over time and the unread message count badge at the dock icon shows a false indication for unread messages.

Operating system

Ubuntu 25.04 / Gnome

Application version

Element version: 1.11.101

How did you install the app?

via apt package manager

Homeserver

No response

Will you send logs?

No

p-fischer avatar Jul 23 '25 08:07 p-fischer

Image

We do try to close the notification, its possible that Electron does not wire this up in Linux though there is no note in the docs about this https://www.electronjs.org/docs/latest/api/notification#notificationclose

t3chguy avatar Jul 23 '25 08:07 t3chguy

Seems like you're talking about multiple issues here:

  1. You expect the notifications shown to be immediately dismissed once you open the app and see the message.
  2. Dock icon shows the incorrect count.

MidhunSureshR avatar Aug 04 '25 10:08 MidhunSureshR

1. You expect the notifications shown to be immediately dismissed once you open the app and see the message.

2. Dock icon shows the incorrect count.

Yes, that's right. Although to clarify: I think 1. is the cause and 2. is only the effect of 1. because the badge count is actually consistent with the notification count.

p-fischer avatar Aug 05 '25 06:08 p-fischer

This happens on MATE Desktop environment (Debian 13 if that matters), always at least one unread notification even if there are no new messages. Attempting to "Mark All As Read" under Settings -> Notifications doesn't help.

AffSeda avatar Aug 20 '25 15:08 AffSeda