Fix top post push notification having no title minds#3202
Ticket(s) / Related Merge Requests
Summary of Changes
Fixes minds#3202 (closed) by replacing the body of the push notification by its title so the top post notification for an image without any title or description would say "@username posted an image" and the body will be empty instead of the other way around which was causing problems
Testing Considerations
You will need to use the CLI to check different lists:
First, get your channel GUID from https://fix-apns-no-title-m3202.minds.io//api/v1/channel/{{username}}
Note for deployer
You need to add $CONFIG->set('unseen_top_algorithm', 'latest');
to the settings.php and helm upgrade
Web
- Log in to your account
- Enabled push notifications (from settings or notifications dropdown)
- Post an image/video without any title or description
- close the tab
Android
For devs
- Add the fcm-key.json from bitwarden to the root of engine in the php-fpm container
- change this line in helm-charts to
'key_path' => __DIR__ . '/fcm-key.json',
and helm upgrade
For the tester
- get into BrowserStack and open any sandbox app
- change API URL to
https://fix-apns-no-title-m3202.minds.io
- restart app and login
iOS (only devs)
- Make sure you have a valid developer certificate
- built the app with that certificate, login, and allow notifications
- export your certificate and convert to a pem file
- put that pem file in the sandbox at engine/ and change the helm chart to reflect the new location and file name
- now you're ready to trigger a notification
Triggering notification
Get into the php-fpm container of the fix-apns-no-title-m3202
pod and run:
cd engine
source /vault/secrets/env && php cli.php Notification sendTopPostPush --user_guid={{YOUR GUID}} --target_list=AllDevices
you should now receive a notification. Make sure the notification looks alright in all major browsers and OSes
Deployment Considerations
N/A
Regression Scope
push notifs
Platform Affected (web, mobile, etc)
all
Developer Testing Completed
yes
Screenshots / Screen Recording
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 Manish