Skip to content

fix(web-push): improve fetching notifications with web-push - #3549

Merged
Antreesy merged 6 commits into
masterfrom
fix/noid/web-push
Oct 29, 2026
Merged

Antreesy merged 6 commits into
masterfrom
fix/noid/web-push

Conversation

@Antreesy

Copy link
Copy Markdown
Collaborator

Fix minor web-push handling issues:

  • fetch notifications on web push after activation
    • activation has set hasNotifyPush flag, so every onPush event skipped the new list fetch.
  • slow down polling when the subscription is already active
    • The server sends the activation push only for a new subscription. Later page loads send response 200, so onActivated was never called, so polling stayed at 30 seconds instead of 15 minutes
  • register web push when the page is already loaded
    • If the app mounts after the window.load() event, the listener never fired
  • handle activation request errors with try-catch to still set polling interval to 15 min

🤖 AI (if applicable)

  • The content of this PR was partly or fully generated using AI (ClaudeCode:claude-opus-5-5)

@Antreesy

Copy link
Copy Markdown
Collaborator Author

/backport! to stable35

@Antreesy

Copy link
Copy Markdown
Collaborator Author

/backport! to stable34

@Antreesy

Copy link
Copy Markdown
Collaborator Author

/compile

@Antreesy

Copy link
Copy Markdown
Collaborator Author

/compile rebase

Antreesy and others added 6 commits October 29, 2026 13:36
Web push activation set hasNotifyPush, so every later web push
skipped the fetch.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
The server sends the activation push only for a new subscription.
On later page loads onActivated was never called, so polling stayed
at the default interval.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
If the app mounts after the load event, the listener never fired.

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
@Antreesy
Antreesy merged commit 15bd23b into master Oct 29, 2026
34 of 35 checks passed
@Antreesy
Antreesy deleted the fix/noid/web-push branch October 29, 2026 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants