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
Unknown Object (File)
Wed, Nov 27, 7:39 AM
Unknown Object (File)
Sat, Nov 23, 1:55 AM
Unknown Object (File)
Wed, Nov 13, 7:41 AM
Unknown Object (File)
Wed, Nov 13, 7:41 AM
Unknown Object (File)
Wed, Nov 13, 7:41 AM
Unknown Object (File)
Wed, Nov 13, 7:41 AM
Unknown Object (File)
Wed, Nov 13, 7:41 AM
Unknown Object (File)
Oct 12 2024, 4:53 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
Branch
marcin/eng-6051
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

tomek added inline comments.
keyserver/src/push/crypto.js
201–204

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.