Push for Nextcloud
Push for Nextcloud
Background
UnifiedPush is growing, recently thanks to Murena's /e/OS v2.5 integrating a UP distributor. I published an [analysis][j-UPGO] of that and a sketch of the [wider scope of work needed][j-UPWI] around it. One of the main areas needed is adding UP support in key apps.
This project adds UP instant updates to one of the key apps, Nextcloud.
Overview
Overview and References: https://lab.trax.im/up/push-for-nextcloud
What? Nextcloud Instant Updates over WebPush and UnifiedPush.
Why? Nextcloud app gets instant updates. Nextcloud-Talk gets instant updates. Sent by WebPush, received by UnifiedPush. UnifiedPush and Nextcloud are key MobiFree components.
How? Make the Nextcloud 'notifications' component use WebPush.
The current plan is described by karmanyaahm in nextcloud/notifications #1225 and by S1m in NextPush/uppush #17. At least two people previously made a start, in different ways (ZOCKER-1, GAVINE99-1) and we expect substantial parts of their work can be used. The remaining work is mainly in nextcloud-notifications.
- nextcloud-android, nextcloud-talk-android: mostly done by Gavine99.
- nextcloud-notifications: refactoring for multiple notification methods (begun by Zocker); add webpush method.
Outcome is: patches submitted to nextcloud-notifications, nextcloud-android, nextcloud-talk-android (targeting the FOSS apps only), along with expected docs/tests/etc.
S1m explained the problem with a previous attempt at solving this issue: The set of patches proposed by Gavine99 went against the design principle of UP. It tied the Nextcloud application pushes to the particular instance of Nextpush UP server running on the same Nextcloud.
With a UP-conformant approach, instead, the end user's device tells the app-server which push server it shall use, and that serves all the device's pushes from any and all applications, including multiple Nextcloud services and non-Nextcloud applications.
s1m explained in S1M17A 2024-09-06, continuing:
A better approach is to add Web Push support to the notifications app. This have many advantages:
- You don't need to change anything on nextcloud server
- You don't need to change anything on nextpush (server) application
- Nextcloud applications are updated more frequently than nextcloud server. So it gives the support of the feature earlier (you don't have to wait for a new nextcloud version)
- You can use any push server out of the box, NextPush or another one, from the same nextcloud server or not
- It is compliant with UnifiedPush
And, if we add web push support to notification application, you wouldn't have to change much of the code you have written for nextcloud and talk (android).
Someone already start working on this support: https://github.com/nextcloud/notifications/issues/1225#issuecomment-2262644834, that's probably possible to continue their work on it.
So, what do you think moving to the web push approach ?