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
Eduardo Santos
Eduardo SantosOP3mo ago
@Pawan Jain could you help with this?
Pawan Jain
Pawan Jain3mo ago
@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
Eduardo Santos
Eduardo SantosOP3mo ago
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
Novu_Bot
Novu_Bot3mo ago
@Eduardo Santos, you just advanced to level 3!
Pawan Jain
Pawan Jain3mo ago
step.digest will tell that is aggregated
Eduardo Santos
Eduardo SantosOP3mo ago
but step.digest is not present in the payload data of the push notification, at least not for fcm
Pawan Jain
Pawan Jain3mo ago
I 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
Pawan Jain
Pawan Jain3mo ago
No description
Eduardo Santos
Eduardo SantosOP3mo ago
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
Pawan Jain
Pawan Jain3mo ago
Would you like to share your usecase a bit more ? can be used in title as well
Eduardo Santos
Eduardo SantosOP3mo ago
But why is this information not present in the data object of the message?
Pawan Jain
Pawan Jain3mo ago
Because we do not send this information. This is relevant till step content compilation
Eduardo Santos
Eduardo SantosOP3mo ago
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?
Pawan Jain
Pawan Jain3mo ago
Currently it is not possible Do you want to aggregate the links as well?
Eduardo Santos
Eduardo SantosOP3mo ago
Yes, or an easy way to indentify in the fcm message data when it was aggregated by Novu or not
Pawan Jain
Pawan Jain3mo ago
in the client side, it will not be possible to identify this as digest compilation happens before sending the message
Want results from more Discord servers?
Add your server