Skip to content

Feature/168 browser web push#450

Merged
thisismeonmounteverest merged 12 commits into
BeWelcome:developfrom
buyolitsez:feature/168-browser-web-push
Jul 15, 2026
Merged

Feature/168 browser web push#450
thisismeonmounteverest merged 12 commits into
BeWelcome:developfrom
buyolitsez:feature/168-browser-web-push

Conversation

@buyolitsez

Copy link
Copy Markdown
Contributor

To close #168

  • Add browser notifications for private messages, hosting requests, invitations, and subscribed forum threads.
  • Support three preference modes:
    • No: notifications disabled.
    • OpenOnly: notifications displayed while BeWelcome is open.
    • Always: Web Push delivery with BeWelcome tabs closed.

Deployment notes:

  • Configure valid WEB_PUSH_VAPID_SUBJECT, WEB_PUSH_VAPID_PUBLIC_KEY, and WEB_PUSH_VAPID_PRIVATE_KEY values.
  • Schedule bin/console send:notifications frequently.
  • Schedule bin/console data:retention daily.
  • Import the new entries from translations/missing.
image

…eb-push

# Conflicts:
#	translations/missing/preference.yaml
Validate endpoint ownership and VAPID configuration, make migrations
and queue leases safe, and reconcile subscriptions across preference
and logout transitions.

Align retention, member exports, privacy copy, and regression coverage
with the stored push data.

Refs BeWelcome#168
Comment thread src/Command/DataRetentionCommand.php
Comment thread src/Command/SendAndPushNotificationsCommand.php
@@ -38,6 +43,9 @@ public function __construct(
private EntityManagerInterface $entityManager,
private LoggerInterface $logger,
private Mailer $mailer,
private BrowserNotificationService $browserNotificationService,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these be the Interfaces instead of the real thing? Otherwise I do not see why the interfaces were introduced in the first place.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There were no interfaces for those services, and the existing interfaces do not expose their queue() or process() operations. So, since each service currently has only one implementation, I think that introducing a new interface would be strange
Do you think we should add a new interface?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I do not think we need an interface here. There isn't the need for further abstraction. The reason for my comment was that you introduced the interface but didn't use it afterwards.

Comment thread src/Controller/BrowserPushSubscriptionController.php Outdated
Comment thread src/Controller/PasswordController.php

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aren't we cleaning up on the browser pushes? Why extract them?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the cleanup time-based - when browser-push:retention runs, notifications older than 7 days are deleted together with their delivery records, and inactive subscriptions older than one year are also removed

Until then, everything remains stored and linked to the member (recent or pending notifications, their delivery attempts/status/errors, and active subscriptions). Therefore, they should be included in the data export

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay. Why do we keep the data for 7 days then? Isn't 1 enough and therefore doesn't need to be extracted?

@thisismeonmounteverest thisismeonmounteverest merged commit 4a5cd42 into BeWelcome:develop Jul 15, 2026
9 checks passed
thisismeonmounteverest added a commit that referenced this pull request Jul 15, 2026
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

Successfully merging this pull request may close these issues.

Add browser notificcation via webpush

2 participants