ranfdev / Notify

Linux client for https://ntfy.sh
GNU General Public License v3.0
55 stars 5 forks source link

Unified Push support #13

Open topjor opened 11 months ago

topjor commented 11 months ago

It would be very nice to have push notification integration for other apps trough Unified Push over ntfy. This would also help get the ball rolling in the linux 'desktop' world to start making more efficient background updates. especially on battery powered devices.

I am currently learning rust myself and trying to make a proof of concept fake distributor that can hopefully be integrated into the daemon to provide unified push support.

I am also updating and sending PR's to libraries as quite some are not used much and have not updated in a while with some breaking spec changes.

Current status and proof of concept repository: https://gitlab.com/j0dev/rust/rust-unifiedpush-example-distributor

topjor commented 11 months ago

I have finished my fake distributor, However it does work fully asynchronous because of dbus, which also requires the database to be asynchronous compatible (see my notes in the repo). I have been going trough your code to understand how it works exactly.

From what I see there are 2 ways for integrating UnifiedPush

  1. Direct integration in the daemon. This would need some topic management code to be separated from the RPC system, so it can be reused, also some extra options are needed so the system can distinguish between regular and UnifiedPush subscriptions.

  2. External integration. Having 2 applications (the GUI and the UnifiedPush manager) talk to the RPC to have their own topic subscriptions. Currently it is setup for a 1 to 1 relation between daemon and GUI.

There is as always a third option to not integrate it and build a separate system for doing UnifiedPush
(and perhaps a system that is more modular to what distributor / communication system is used and integratable into a desktop environment like gnome and phosh)

000exploit commented 7 months ago

Nobody seems to be interested in that.

alistair23 commented 2 days ago

Did you make any progress? It would be great if this could support UnifiedPush

KDE now has a unified push library (KUnifiedPush) so there is progress being made on desktop