-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Description
Background
We include Onyx data in the payload for each of our push notifications. On receipt, we merge the onyx data and update the app with any previously missed onyx updates if necessary (src). However, there is a 4 KB size limit for push notification payloads, so we remove the Onyx data when see the payload would be too large. This usually happens because the message for the push notification is too long. Additionally, we're implementing some optimizations in the backend where we squash multiple Onyx updates together to reduce the number updates we store in the database which also increases the potential payload size.
Problem
The 4KB size limit prevents Onyx data delivery in push notifications for large messages and prevents us from squashing onyx updates in some scenarios.
Solution
Support push notification payloads that are compressed using GZIP so that we can fit more data. Specifically, the value in payload would be a GZIP compressed JSON string. Decompressing and parsing the string as an object should yield the same payload object that we normally receive now.
To ensure backward compatibility we should still support uncompressed payloads. We'll start sending compressed push notification payloads when we're confident clients have broad support for it.
We'll need to support compressed payloads in both JS and native code:
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~021876663566682945155
- Upwork Job ID: 1876663566682945155
- Last Price Increase: 2025-01-07
- Automatic offers:
- dominictb | Reviewer | 105934695
Issue Owner
Current Issue Owner: @arosiclairMetadata
Metadata
Labels
Type
Projects
Status