Page MenuHomePhabricator

[keyserver] Remove `badge` from iOS rescind notification
ClosedPublic

Authored by atul on Nov 9 2022, 4:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Nov 24, 6:32 AM
Unknown Object (File)
Sun, Nov 24, 6:32 AM
Unknown Object (File)
Sun, Nov 24, 6:32 AM
Unknown Object (File)
Sun, Nov 24, 6:32 AM
Unknown Object (File)
Tue, Nov 19, 9:00 PM
Unknown Object (File)
Sat, Nov 2, 7:56 PM
Unknown Object (File)
Sat, Nov 2, 7:56 PM
Unknown Object (File)
Sat, Nov 2, 7:56 PM
Subscribers

Details

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.

Diff Detail

Repository
rCOMM Comm
Branch
master
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

Added @ashoat since he has the most context here, feel free to resign if you don't think it makes sense to be a first-pass reviewer.

atul requested review of this revision.Nov 9 2022, 5:06 PM
This revision is now accepted and ready to land.Nov 9 2022, 7:00 PM
This revision was landed with ongoing or failed builds.Nov 9 2022, 7:23 PM
This revision was automatically updated to reflect the committed changes.