How to know if a FCM Push Notification is aggregated or not?
Hi, I need to redirect the Users to the specific content of my push notification message. I'm already sending the payload data with some information, but logging all the Push notification message data there's no attribute informing if the notification was aggregated (digest) or not. I need this information to redirect the Users correctly. How do I know this in the message object of a Push notification?
16 Replies
@Pawan Jain could you help with this?
@Eduardo Santos
Push notitications can be aggregated by adding digest step before push step
in the push step title or content, you can use digest template
https://v0.x-docs.novu.co/workflows/digest
I know, but how can I get the information when the Push notification arrives to the device? The payload data has not information if the message was aggregated or not
@Eduardo Santos, you just advanced to level 3!
step.digest will tell that is aggregated
but
step.digest
is not present in the payload data of the push notification, at least not for fcmI think I am not able to share it correctly
{{step.total_count}}
{{#if step.digest}}
{{#each step.events}}
{{name}}
{{/each}}
{{else}}
Not a digested template
{{/if}}
Above content can be used in push step message section
So I'll need to check by the
Title
when the message arrives in the App? I thought would be able to do this with a data object like: message.data.digest
Would you like to share your usecase a bit more ?
can be used in title as well
But why is this information not present in the data object of the message?
Because we do not send this information. This is relevant till step content compilation
Ok, I'll use the Title then
But without using directly the Title, how do you manage the situation when different links are required if you don't send this digest info in the data object for push?
Currently it is not possible
Do you want to aggregate the links as well?
Yes, or an easy way to indentify in the fcm message data when it was aggregated by Novu or not
in the client side, it will not be possible to identify this
as digest compilation happens before sending the message