Page MenuHomePhabricator

Don't add nullish id field to badgeonly notification payload
ClosedPublic

Authored by marcin on Dec 13 2023, 7:17 AM.
Tags
None
Referenced Files
F2210720: D10326.id34620.diff
Sun, Jul 7, 11:59 PM
Unknown Object (File)
Sun, Jul 7, 1:56 PM
Unknown Object (File)
Sun, Jul 7, 9:57 AM
Unknown Object (File)
Sat, Jul 6, 12:02 AM
Unknown Object (File)
Fri, Jun 21, 1:45 AM
Unknown Object (File)
Fri, Jun 21, 1:45 AM
Unknown Object (File)
Wed, Jun 12, 12:28 AM
Unknown Object (File)
May 20 2024, 9:54 AM
Subscribers

Details

Summary

The id field of Android notification must be either string or be absent at all. Currently if notification doesn't have id field
encryptAndroidNotification function puts nullish value to its encrypted form. This was the casue of
https://linear.app/comm/issue/ENG-6051/encrypted-badge-updates-on-android-are-broken.

Test Plan
  1. Add console.log to fcmSInglePush method to log if sending notifications fails.
  2. Build Android app and send badge only notification.
  3. Ensure no error is logged

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

tomek added inline comments.
keyserver/src/push/crypto.js
201–204 ↗(On Diff #34566)

plaintext is a single word. Regardless, I think unencryptedData might be less confusing.

This revision is now accepted and ready to land.Dec 13 2023, 9:46 AM
  1. Address comment about inaccurate name for data that is not supposed to undergo encryption.
  2. Rebase before landing.