When a notification is sent to a specific topic, such as...
const message = {
data: { cost: 49 },
topic: 'apple'
}
admin.messaging().send(message)
The question revolves around controlling/filtering notifications based on user-defined criteria like >= 50. Is it possible using Firestore or localStorage?
How could this be achieved?
I'm assuming it can be accomplished through messaging-sw.js, but how exactly and is it feasible?
Alternatively, are there any better solutions or am I overlooking something?