samagra-comms / inbound

0 stars 15 forks source link

Make FCM notification payload configurable from conversation logic. #36

Open karntrehan opened 1 year ago

karntrehan commented 1 year ago

FCM notification have a limitation on Android. When the app is in background FCM reads the notification object and handles redirections on its own. This prevents us from deeplinking into a particular screen with params and add telemetry to delivery of message. We can fix this by sending only data object in payload and prevent notification object completely.

To ensure minimal impact this can be a config driven change.

Ex: In conversation logic add parameter fcm_payload_objects=[notification, data] From NL we shall configure it as fcm_payload_objects=[data] which would result in a null notification object.