Skip to content
This repository was archived by the owner on Mar 10, 2026. It is now read-only.

Add mobile push notifications using WebPush#49

Merged
7w1 merged 99 commits into7w1:devfrom
CloudHub-Social:dev
Mar 3, 2026
Merged

Add mobile push notifications using WebPush#49
7w1 merged 99 commits into7w1:devfrom
CloudHub-Social:dev

Conversation

@Just-Insane
Copy link
Copy Markdown
Collaborator

@Just-Insane Just-Insane commented Mar 2, 2026

Adds mobile push notifications via web push, default config uses a Sygnal server hosted by @GigiaJ at the moment. This can easily be swapped out via the instructions and config originally provided by him.

Description

Fixes #44

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings

~ Evie

GigiaJ added 30 commits June 20, 2025 17:03
…o publicly host it unless it becomes irrational in cost which should never happen)
krishukr and others added 20 commits February 15, 2026 19:06
currenttly all browser requrire a `push` produces a notification, if
not, push subscription may be revoked.

see:
firebase/firebase-js-sdk#8010 (comment)

in this case, sygnal, the push gateway will send unread count, and
create a `push` event, when messages are read on other clients.
Therefore we have no choice but to stop sygnal from pushing data that
won't be presented as notifications

see:
https://github.com/element-hq/sygnal/blob/da48ba7457409391c1d12140ce2ea3d49d377ff3/sygnal/webpushpushkin.py#L142-L145
so that a notification will always be generated from a push event,
avoiding being killed for privacy policies from browser and os
Sygnal already adds `mailto:` by itself. When added manually, apple will error out with `403: BadJwtToken`. Hence the mailto should be removed :)

(cherry picked from commit 0d66762)
Signed-off-by: Kris Hu <i@krishu.moe>
Pull upstream changes before creating PR to upstream
…correct session before opening room on click
@Just-Insane
Copy link
Copy Markdown
Collaborator Author

This should now correctly handle the following:

  • Push notifications match the format of in-app notifications
  • Push notifications are silenced when the app is visible (in-app notifications fire)
  • Push notifications now fire for backgrounded sessions
  • On-click now correctly handles session switching prior to opening room

@7w1 7w1 merged commit 461666d into 7w1:dev Mar 3, 2026
4 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Mobile Push Notifications

6 participants