Skip to content

Fix top post push notification having no title minds#3202

Manish requested to merge fix/apns-no-title-m3202 into master

Ticket(s) / Related Merge Requests

minds#3202 (closed)

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

  1. Log in to your account
  2. Enabled push notifications (from settings or notifications dropdown)
  3. Post an image/video without any title or description
  4. close the tab

Android

For devs

  1. Add the fcm-key.json from bitwarden to the root of engine in the php-fpm container
  2. change this line in helm-charts to 'key_path' => __DIR__ . '/fcm-key.json', and helm upgrade

For the tester

  1. get into BrowserStack and open any sandbox app
  2. change API URL to https://fix-apns-no-title-m3202.minds.io
  3. restart app and login

iOS (only devs)

  1. Make sure you have a valid developer certificate
  2. built the app with that certificate, login, and allow notifications
  3. export your certificate and convert to a pem file
  4. put that pem file in the sandbox at engine/ and change the helm chart to reflect the new location and file name

Screen_Shot_2022-07-05_at_16.15.26

  1. 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:

  1. cd engine
  2. 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

Screen_Shot_2022-06-29_at_18.16.50

Screen_Shot_2022-06-29_at_18.16.46

Screen_Shot_2022-06-29_at_19.00.41

Screen_Shot_2022-06-29_at_19.00.47

Screen_Shot_2022-07-05_at_16.11.54

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

Merge request reports