linux_notification_center icon indicating copy to clipboard operation
linux_notification_center copied to clipboard

Given ID should be reused when replacing notification

Open The-Compiler opened this issue 4 years ago • 0 comments

According to the spec:

If replaces_id is not 0, the returned value is the same value as replaces_id.

However, linux_notification_center assigns a new ID even when replacing a notification.

This can e.g. by reproduced by doing:

$ gdbus call --session \
           --dest org.freedesktop.Notifications \
           --object-path /org/freedesktop/Notifications \
           --method org.freedesktop.Notifications.Notify \
           -- \
           my_app_name \
           0 \ 
           gtk-dialog-info \
           "The Summary" \  
           "Here's the body of the notification" \
           '[]' \
           '{}' \
           -1
(uint32 32,)

then with the ID from above:

$ gdbus call --session \
           --dest org.freedesktop.Notifications \
           --object-path /org/freedesktop/Notifications \
           --method org.freedesktop.Notifications.Notify \
           -- \
           my_app_name \
           32 \
           gtk-dialog-info \
           "The Summary 2" \
           "Here's the body of the notification" \
           '[]' \
           '{}' \
           -1
(uint32 33,)

~~replacing itself works fine~~ (not sure anymore about this!), but there's a new ID returned.

The-Compiler avatar Mar 27 '21 19:03 The-Compiler