Skip to content

[engine] Top post push notifications mobile-native#4289

Ben requested to merge feat/daily-digest-push-mob4289 into master

Ticket(s) / Related Merge Requests

Summary of Changes

Daily notification runner to highlight a post from a users UnseenTopFeed.

Setting will not be functional until the merge of minds#3128 (closed)

Targets FCM service so it should ONLY HIT ANDROID.

Testing Considerations

Setting should be tested against mobile to ensure it displays properly without the underscore (have tested this myself with @msantang78 and all seems well) - note as mentioned above until the merge of minds#3128 (closed) the option will not be functional.

You will need to use the CLI to check different lists:

First get your channel GUID from /api/v1/channel/{{username}}

Then get a development version of the app, and in the development settings set your API URL as this sandbox URL - make sure push notifs are enabled for the account you're testing and close the app.

Android Devices only (need to discuss how to set this up but this is the main target of the change)

# A given user guid
php cli.php Notification sendTopPostPush --user_guid=991463054707265537 --target_list=AllAndroidAppDevices

# ALL (can test this if you like but preferably target your user as you will hit the dev team with notifs)
php cli.php Notification sendTopPostPush --target_list=AllAndroidAppDevices

All Devices (inc Web push) - easier to quickly test with.

# A given user GUID
php cli.php Notification sendTopPostPush --user_guid=991463054707265537 --target_list=AllDevices

#ALL (can test this if you like but preferably target your user as you will hit the dev team with notifs)
php cli.php Notification sendTopPostPush --target_list=AllDevices

The algorithm has been configured for this test env so it will send the latest post, thus to test different entity types, you just need to post a new entity and re-run the CLI job.

Deployment Considerations

Engine needs to go first, followed by a Terraform update to add to k8s-cronjobs.yaml

  ###
  # TopPost Push Notification
  ###
  - name: TopPostPush
    schedule: "0 20 * * *"
    args:
      - "-c"
      - "php cli.php Notification sendTopPostPush --target_list=AllAndroidAppDevices"

You also need to create the index from the CQL provisioner:

CREATE INDEX push_notifications_device_subscriptions_service_idx ON minds."push_notifications_device_subscriptions" (service);

Regression Scope

Unseen top feed & push notifications

Platform Affected (web, mobile, etc)

Mobile

Developer Testing Completed

Manual against android and web, and unit testing.

Screenshots / Screen Recording

image

Screenshot_20220524-102601_Lawnchair Screenshot_20220523-155349_Lawnchair Screenshot_20220524-102510_Lawnchair Screenshot_20220524-102438_Lawnchair Screenshot_20220524-102351_Lawnchair Screenshot_20220523-155416_Lawnchair Screenshot_20220523-155441_Lawnchair

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