SUMMARY When KDE connect (the sendnotifications plugin specifically) starts, calling the `Notify` method on `org.freedesktop.Notifications` with `replace_id == 0` returns incorrect ids. From my understanding, these IDs are KDE Connect's internal ids assigned to notifications, and not the notification manager's IDs. With more spec-relaxed servers, such as Dunst, it is a lot less annoying since they just allow us to use KDE Connect's internal notification IDs. With spec-strict servers (like Mako), this makes it almost impossible to replace notifications, since the IDs clients get from D-Bus are useless. STEPS TO REPRODUCE 1. Make sure you are running a notification manager which is strict about notification IDs, e.g. Mako 2. `curl https://raw.githubusercontent.com/vlevit/notify-send.sh/master/notify-send.sh > notify-send; chmod +x notify-send` 3. Start kdeconnectd with sendnotifications plugin enabled, and connect to a device (make sure that the sendnotifications plugin activates) 4. Run `./notify-send -R test test` repeatedly OBSERVED RESULT Multiple notifications appear, one for each `notify-send` invocation EXPECTED RESULT Only one notification appears (and gets updated on new notify-send invocations) SOFTWARE/OS VERSIONS NixOS GNU/Linux 21.11pre (nixpkgs 263ef4cc4146c9fab808085487438c625d4426a9) Sway 1.6.1 Mako 1.6 kdeconnect 21.08.3
*** Bug 463782 has been marked as a duplicate of this bug. ***
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/516
A possibly relevant merge request was started @ https://invent.kde.org/network/kdeconnect-kde/-/merge_requests/528
Git commit 4523ba588276bc5d2bc7f0e11cf39743efeca263 by Fushan Wen. Committed on 13/03/2023 at 02:20. Pushed by fusionfuture into branch 'master'. Use `org.freedesktop.DBus.Monitoring` to monitor notifications Plasma notification widget also uses the interface, and sometimes notification ids can become out of sync between the two DBus adaptors. FIXED-IN: 23.08 M +1 -0 CMakeLists.txt M +1 -0 plugins/sendnotifications/CMakeLists.txt M +169 -69 plugins/sendnotifications/notificationslistener.cpp M +10 -7 plugins/sendnotifications/notificationslistener.h https://invent.kde.org/network/kdeconnect-kde/commit/4523ba588276bc5d2bc7f0e11cf39743efeca263