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

Set up unified push messaging using the ntfy docker. Rework notifications. #2631

Open
dessalines opened this issue Dec 23, 2022 · 10 comments
Open
Labels
Milestone

Comments

@dessalines
Copy link
Member

dessalines commented Dec 23, 2022

This would be trivial to do, since we already send live messages over websockets.

Then mobile clients like Jerboa could subscribe to them.

https://docs.ntfy.sh/install/

https://f-droid.org/2022/12/18/unifiedpush.html

edit: also as part of this, I should rework notifications a bit.

@dessalines dessalines added the enhancement New feature or request label Dec 23, 2022
@Nutomic
Copy link
Member

Nutomic commented Dec 24, 2022

If i understand correctly, to make push notifications work with this unified push requires installing a separate application, and manually disabling battery optimizations for it. Some users who care about privacy a lot might do this, but the average user will find it much too complicated. So in practice we might have to support Googles push notification service as well.

But personally, I dont think that push notifactions are really necessary for Lemmy. If you open the app once a day, you will see notifications in time. Besides, we want to avoid functionality which gets users addicted, and push notifications are definitely one of them.

@dessalines
Copy link
Member Author

You're correct, it does require installing an additional app, the ntfy one, definitely an annoyance.

At the same time tho, I kind of want to encourage using unified push as a long-term, less google-reliant solution to notifs. Google's FCM requires google play services, which a lot of android variants, as well as open source enthusiasts would rather not use. So we'd make notifications optional on both the server and client side.

Using FCM might also be a security concern, so we'd almost certainly want to e2ee encrypt the message content (not super difficult), to avoid letting google hoover up all the data. If we used a self-hosted NTFY ( or even the one offered ), we wouldn't have to do that work.

The mastodon android app has notifs, and I must say they are pretty useful, but they're using FCM.

@dessalines dessalines changed the title Set up unified push messaging using the ntfy docker. Set up unified push messaging using the ntfy docker. Rework notifications. Jan 9, 2023
@karmanyaahm
Copy link

There is a library for UnifiedPush that can automatically fall back to FCM when UP is not available: https://unifiedpush.org/developers/embedded_fcm/

@krestenlaust
Copy link
Contributor

I think E2E with FCM is many times better than installing an extra app to get it working. Wouldn't it achieve the same?

@Stumblinbear
Copy link

I wouldn't underestimate how much battery usage would rise if you had to have a persistent connection. It would also be terrible for servers due to the 24/7 load it would put them under.

Additionally, almost more importantly, you must have proper push notifications for iOS since it does not allow backgrounded apps to stay alive indefinitely in any case.

@Nutomic
Copy link
Member

Nutomic commented Oct 2, 2023

Web Push API would be an alternative solution to this.

@Nutomic Nutomic mentioned this issue Oct 2, 2023
4 tasks
@uniquePWD
Copy link

I wouldn't underestimate how much battery usage would rise if you had to have a persistent connection. It would also be terrible for servers due to the 24/7 load it would put them under.

Additionally, almost more importantly, you must have proper push notifications for iOS since it does not allow backgrounded apps to stay alive indefinitely in any case.

Were these concerns addressed?

@dessalines
Copy link
Member Author

I use ntfy every day, and its battery usage is <1%. If there are battery concerns, it'd have to be opened on their repo.

@karmanyaahm
Copy link

Since WebPush is a subset of UnifiedPush, implementing WebPush is a great way to solve this since then you get push on both the web, and on FOSS Android (using ntfy or other distributors).

@LazaroFilm
Copy link

Let's keep this ticket alive. This really needs to happen to keep Lemmy usable for most. The lack of a decent push notification system can be a deterrent for new users.

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

No branches or pull requests

8 participants