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

Chatmail: Push Notifications #291

Open
6 tasks
s0ph0s-dog opened this issue Feb 16, 2025 · 1 comment
Open
6 tasks

Chatmail: Push Notifications #291

s0ph0s-dog opened this issue Feb 16, 2025 · 1 comment

Comments

@s0ph0s-dog
Copy link
Contributor

This is part of a series of issues tracking chatmail support in Mox.

Chatmail servers provide support for sending platform-native push notifications on iOS and Android.

  • Upon set of the /private/devicetoken\tuser@host.tld key (with a notification token), append that token to a table linking tokens to user accounts. Caution: all tokens set with this method should be preserved! This allows users to have multiple devices. The token should be treated as an opaque string with no meaning, which must be preserved exactly and sent exactly.
  • Add configuration option in domains.conf to allow the administrator to specify a notification server URL. Default to https://notifications.delta.chat/notify if not set.
  • Upon receipt of a new message, collect all of the tokens for that user from the database and enqueue requests to the configured URL with each notification in the body of the request. It should make one request per token. The requests should be retried via exponential backoff up to a deadline of 5 hours after enqueueing.
  • Ensure notification tokens are deleted when an account is deleted.

(These two are not strictly notification related, but they require similar changes, so it would be reasonable to do them at the same time.)

  • Add configuration option in domains.conf to allow the administrator to specify an Iroh relay server URL.
  • Hook into reads of the /shared/vendor/deltachat/irohrelay key to return the configured Iroh relay server URL from the settings.
@mjl-
Copy link
Owner

mjl- commented Feb 17, 2025

I think we'll have to implement push notifications according to the current chatmail approach as you described.

At some point in the future, we can hopefully use a standardized push notification mechanism.
Perhaps through this: https://datatracker.ietf.org/doc/draft-gougeon-imap-webpush/ (with some background at https://unifiedpush.org/news/20250131_push_for_decentralized/).
This earlier work is also interesting: https://github.com/coi-dev/coi-specs/blob/master/webpush-spec.md

Anyway, it will take time before a push mechanism is standardized and before it makes it into software, so we shouldn't wait for it. Just wanted to mention potential future approaches for context.

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

2 participants