Sweets / tiramisu

Desktop notifications, the UNIX way
MIT License
740 stars 19 forks source link

Notification ID of 0 violates notification spec #51

Closed The-Compiler closed 2 years ago

The-Compiler commented 2 years ago

According to the Desktop Notifications Specification:

If replaces_id is 0, the return value is a UINT32 that represent the notification. It is unique, and will not be reused unless a MAXINT number of notifications have been generated. An acceptable implementation may just use an incrementing counter for the ID. The returned ID is always greater than zero. Servers must make sure not to return zero as an ID.

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

Yet tiramisu always returns 0:

https://github.com/Sweets/tiramisu/blob/55cec2d90884e62dbcb8f1b3b3a6f466143300ed/src/dbus.vala#L27

Even if replaces_id isn't really supported by Tiramisu, I'd expect it to at least return a return value according to the spec.

Sweets commented 2 years ago

Now returns an incremental notif id, thanks for the heads up. 👍

If you notice anything else let me know.