nextcloud / notifications

đź”” Notifications app for Nextcloud

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support Web Push Notifications by Apple

githubkoma opened this issue · comments

Dear Nextcloudians,

with iOS 16.4 Apple finally implemented Web Push Notifications (years and years after Android, regarding to mobile......)

Do you already support it, or is it on the roadmap? It would be just awesome and it would instantly enhance many of the Plugins that exist for Nextcloud

Looks like it needs to be implemented either on each Server, or at a Server on your Side, please see:

image

(i think the part of requesting Permissions links to here: NotificationsApp.vue
window.Notification.requestPermission() ... but where is the service worker, that could consume the received notification..)

best regards,
ghk

This is not on our roadmap in the foreseeable future. We have desktop client and mobile apps already which you can use to get notifications.

@nickvergessen Oh ok, i understand.. i would love that feature for a plugin to notify users that dont use talk or the files app

Could you or someone point me to the correct files that should be involved? that would be great

  • Client
  • Server
    • notification route to receive the subscription
    • Service/Controller that already communicates to Pushservers
    • ...

i am thankful for any hint,
thanks in advance,
ghk

NotificationsApp.vue ?

I guess so

Where is the Serviceworker that could consume the Notification?

We don't have a Service worker

notification route to receive the subscription

What subscription?

Service/Controller that already communicates to Pushservers

https://github.com/nextcloud/notifications/blob/master/lib/Push.php

Service/Controller that already communicates to Pushservers

https://github.com/nextcloud/notifications/blob/master/lib/Push.php

thank you!

Where is the Serviceworker that could consume the Notification?

We don't have a Service worker

Oh, i thought so, because you can install Nextcloud as a PWA, i thought in that case a ServiceWorker is needed to be registered in some Manifest File

notification route to receive the subscription

What subscription?

The Client "subscribes" to the WebPush Notification Service as mentioned here: https://web.dev/push-notifications-subscribing-a-user/#what-is-a-pushsubscription

Oh, i thought so, because you can install Nextcloud as a PWA, i thought in that case a ServiceWorker is needed to be registered in some Manifest File

Not sure what PWA is, but no the notifications app is not providing a manifest or anything anywhere.

The Client "subscribes" to the WebPush Notification Service as mentioned here: https://web.dev/push-notifications-subscribing-a-user/#what-is-a-pushsubscription

Yeah, but as said we don't need or want this ourselves at the moment. We have various client available and otherwise you need to have a tab of Nextcloud open in your browser to receive notifications.

We have various client available and otherwise you need to have a tab of Nextcloud open in your browser to receive notifications.

This is the advantage of mozillas standardized web push notification approach, and in mozillas/apples case: You don't have to have any browser open, the push notification is triggered by their push notification servers directly to the mobile devices operating system

Yeah, but as said we don't need or want this ourselves at the moment.

Yes, thanks so far, the information you gave me already helped and perhaps someone builds this into a separate plugin or so in the future

thanks and best regards,
ghk

a Proof of Concept for a Nextcloud Integration can be found here: https://github.com/githubkoma/webpush

For what i've found out:

  • on iOS no browser/tab/app has to be open to receive the notification
  • on Android it seems to be the same
  • for full integration the feature should be within nextcloud itself or the pushproxy
  • ...

The approach over at #1225 looks really sophisticated