HomePhabricator
Diffusion Comm 70c8e68c3f84

[keyserver] Remove `badge` from iOS rescind notification

Description

[keyserver] Remove badge from iOS rescind notification

Summary:
Context: https://linear.app/comm/issue/ENG-2078/notification-rescinds-dont-appear-to-be-working-as-expected

Basically, we shouldn't be sending anything except content-available: 1 in the APS dictionary for background notifications. Any alerts/badges/sounds must be sent via alert notifications.

Here's a relevant snippet from the documentation:

8902e3.png (238×1 px, 61 KB)

(https://developer.apple.com/documentation/usernotifications/setting_up_a_remote_notification_server/generating_a_remote_notification?language=objc)

Background notifications should be "invisible" to the user and may get some runtime (based on a bunch of factors including daily app usage, battery life, etc) in order to execute some code.

This change should be a noop because based on my reading/experimentation including this field wasn't updating the badge count anyways. It looks like we've already realized that rescinding notifications and updating badge count need to happen separately given rescindAndUpdateBadgeCounts(...) sends both an alert and background notification.

Test Plan: The badge count does not update properly whether or not the value of badge is set in the APS object. Updating badge count should be handled by an alert notification.

Reviewers: tomek, marcin, varun, ashoat

Reviewed By: ashoat

Subscribers: abosh

Differential Revision: https://phab.comm.dev/D5589

Details

Provenance
atulAuthored on Nov 9 2022, 7:18 PM
Reviewer
ashoat
Differential Revision
D5589: [keyserver] Remove `badge` from iOS rescind notification
Parents
rCOMM3201ebe45589: [native] Alert staff/developers if `REHYDRATE` action payload isn't as expected
Branches
Unknown
Tags
Unknown