Skip to content

[engine] Push notification support for Superminds #2409

Ben requested to merge feat/supermind-notifs-2409 into master

Ticket(s) / Related Merge Requests

Summary of Changes

Push notif support for superminds

Testing Considerations

exec into the pod and run

source /vault/secrets/env && php cli.php EventStreams --subscription="Core\\Notifications\\NotificationsEventStreamsSubscription"

Plan is to test web push on staging - if you want to try on sandboxes though, in another shell, exec into the pod and:

On redeploy to sandbox

  • Update the engine config map to have the google/firebase/key_path setting set to __DIR__ . '/fcm-key.json'
  • Exec into the pod and navigate to /var/www/Minds/engine
  • Create a new file called fcm-key.json with the content taken from Bitwarden for FCM
source /vault/secrets/env && php /var/www/Minds/engine/cli.php EventStreams --subscription=Core\\Notifications\\Push\\PushNotificationsEventStreamsSubscription

Regardless of whether testing push - test:

  • Create a Supermind offer - should create a notif for the receiver
  • Accept a Supermind offer - should create a notif for the offer sender
  • Reject a Supermind offer - should create a notif for the offer sender

You may have to wait 30s to 60s for the notifications to arrive. The first time you run the above commands it may take some time to catch up.

Deployment Considerations

Needs to be deployed to engine and runners

Regression Scope

Affects notification and push notification streams, and the Supermind console. Other than that changes are mostly additive.

Platform Affected (web, mobile, etc)

Web/mob is in development

Developer Testing Completed

Jasmine / phpspec / codecept integration / manual

Screenshots / Screen Recording

image

(note quote post is here because of #2436 (closed))

  • Create a Supermind offer

notif-supermind-sent

  • Accept a Supermind offer

notif-supermind-accept-2

  • Reject a Supermind offer

notif-supermind-decline

Push

image

Object being sent OUT of WebPushService for a Supermind sent

image

Object being sent OUT of WebPushService for a Supermind declined

image

Object being sent OUT of WebPushService for a Supermind accepted

image

Does this impact

  • Localization
  • Dark/light mode
  • Guest mode

Definition of Done Checklist

  • The Acceptance Criteria has been met
  • Code is tested: Testing includes unit/spec, E2E/automated and manual testing
  • Merge requests description has been filled out
Edited by Ben

Merge request reports