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)
Tue, Jan 28, 5:00 AM
Unknown Object (File)
Fri, Jan 24, 11:24 PM
Unknown Object (File)
Jan 17 2025, 1:47 AM
Unknown Object (File)
Jan 14 2025, 4:44 AM
Unknown Object (File)
Dec 27 2024, 8:28 PM
Unknown Object (File)
Dec 27 2024, 8:28 PM
Unknown Object (File)
Dec 27 2024, 8:28 PM
Unknown Object (File)
Dec 27 2024, 8:28 PM
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 ↗(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.