Hello everyone, I have developed two apps from flutterflow and both share the same database made in firebase. One app is the administrator and the other is the mobile app. I set up a cloud function in which it listens when a new document is created within the publications collection, in this way when I make a new publication from the admin, the push notification arrives to the mobile app, the push notification is sent with this cloud function.
After doing some research I managed to implement this, which is what sends the notification
const message = {
notification: {
title: "This content is of interest to you", // Modified title
body: ${postTitle}, // Body of the notification with the title of the post
},
data: {
link: redirectUrl, // Redirection link
}
};
const response = await admin.messaging().sendEachForMulticast({
tokens: tokens,
...message,
});
As you can see in the data, I am attaching a link which takes me to the specific post. But this does not work, when I press the notification the link is not taken into account. How can I make it take the link into account and when I press the notification it sends me the same link and not to the home page or by default.