Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnifiedPush support #340

Open
johnlpe opened this issue Jul 5, 2023 · 11 comments
Open

UnifiedPush support #340

johnlpe opened this issue Jul 5, 2023 · 11 comments

Comments

@johnlpe
Copy link

johnlpe commented Jul 5, 2023

Please add support for UnifiedPush push notification protocol/standard.

We need push notifications, but we don’t want use centralized online service that read we all notifications, like Android has Google Firebase Messaging Service and iOS has Apple Push Notification service. UnifiedPush protcol is the solution for this. UnifiedPush is open protocol/standard for connection between online service (Application Server) → notification service (Push Server) and notification service’s client (Push Distributor) → application (End User Application). It enables the user to choose the service through he receives his push notifications.

Especially GNU/Linux on mobile is very big need of push notifications and with UnifiedPush we can fix it.

@bmarty
Copy link

bmarty commented Jul 6, 2023

(FTR Element Android already supports UnifiedPush as an alternative to Firebase, and Element Android X will support it as well, once enabled)

@clokep clokep transferred this issue from matrix-org/synapse Jul 7, 2023
@clokep
Copy link
Contributor

clokep commented Jul 7, 2023

I've transferred this to sygnal, which is the project which implements push (homeservers talk to a push gateway, which sygnal is one of).

@richvdh
Copy link
Member

richvdh commented Jul 7, 2023

https://unifiedpush.org/users/gateway/#matrix lists some existing push gateways that support push from Synapse. I'm not convinced we need to complicate Sygnal by bolting in UP support.

@richvdh
Copy link
Member

richvdh commented Jul 7, 2023

Perhaps the OP's request is to support UP more natively in Synapse so that there is no need for a UP gateway? I think that is a thing that is possible and sensible, but I am not familiar enough with UP to know exactly what is required.

This has come up before (matrix-org/synapse#9337) though again that issue didn't make clear exactly what was required.


The reason that APNS and GCM push has to go via Sygnal, instead of happening directly from Synapse, is that for APNS and GCM you have to present a secret authentication key specific to the client application. In other words, you have to use a Sygnal instance which is hosted by the client application author, rather than the HS provider (so the instance at https://matrix.org/_matrix/push should really be https://element.io/_matrix/push, because it is used by the Element applications. Indeed the Matrix foundation does not provide an iOS or Android application.)

With UP, the necessary authentication params can be presented by the client when setting up push -- hence homeservers could do the push themselves rather than delegating to a push gateway hosted by the client authors.

@clokep
Copy link
Contributor

clokep commented Jul 7, 2023

With UP, the necessary authentication params can be presented by the client when setting up push -- hence homeservers could do the push themselves rather than delegating to a push gateway hosted by the client authors.

Ah-ha, I didn't realize this was possible. If this is the request then, I'd say we should move this to matrix-spec...it wouldn't make sense as a Synapse specific feature IMO.

@johnlpe
Copy link
Author

johnlpe commented Jul 9, 2023

Perhaps the OP's request is to support UP more natively in Synapse so that there is no need for a UP gateway? I think that is a thing that is possible and sensible, but I am not familiar enough with UP to know exactly what is required.

Yes, I don't understand, what is the use of separate push gateway? Of course with FCM and APNS it's worth, since you don't want propietary crap in Synapse, but with UP the situation is different.

I don't know where would be best to target these, but I would like:

  1. Matrix homeservers can directly send push notifications via UnifiedPush to the Push Server specified by the user.
  2. Matrix clients UIs expose the push notification confs of the Matrix homeserver.

@johnlpe
Copy link
Author

johnlpe commented Jul 9, 2023

Ah-ha, I didn't realize this was possible. If this is the request then, I'd say we should move this to matrix-spec...it wouldn't make sense as a Synapse specific feature IMO.

IMO each server can decide itself how their deliver push notifications. It's unnecessary to include this in the Matrix communication protocol.

@richvdh
Copy link
Member

richvdh commented Jul 10, 2023

@johnlpe:

Matrix homeservers can directly send push notifications via UnifiedPush to the Push Server specified by the user.

I'm struggling to understand, based on the UP site, exactly what needs to be changed here. Please could you point to a clear spec for what such a push notification looks like? Or give an example HTTP request?

@richvdh
Copy link
Member

richvdh commented Jul 10, 2023

Of course with FCM and APNS it's worth, since you don't want propietary crap in Synapse

That is not the reason that Synapse and Sygnal are separate. Sygnal is entirely open-source; there is no "proprietary crap".

@clokep
Copy link
Contributor

clokep commented Jul 10, 2023

IMO each server can decide itself how their deliver push notifications. It's unnecessary to include this in the Matrix communication protocol.

Devices decide where their push notifications should be routed to, not servers. This allows multiple clients to receive push notifications separately using the same homeserver.


Note that it is already possible to use UnifiedPush with Element Android. @richvdh pointed to documentation about this above: #340 (comment)

@ne20002
Copy link

ne20002 commented Dec 15, 2023

I tried to setup my own ntfy and it is not working with Element. Looking in synapse-admin the gateway is still matrix.gateways.unifiedpush.org and the key includes the address of my ntfy server.
Thus it is that all notifications are send to the external matrix.gateways.unifiedpush.org and then forwarded to my ntfy.
I don't want to expose my ntfy, all devices are inside my network (via wireguard).
As ntfy can act as a matrix push gateway: how to replace the fixed? gateway matrix.gateways.unifiedpush.org with my ntfy server so that I can use the ntfy server directly?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants