-
-
Notifications
You must be signed in to change notification settings - Fork 28
Description
The problem
It would be nice if, as the symfony mailer, an event would be dispatched just before a notification was send to allow to alter the message in a large scale.
For example, today I have notifications sent to a flutter app. Flutter apps need a custom "data" to proper handle it :
Notification is delivered to system tray. When the user clicks on it to open app onResume fires if click_action: FLUTTER_NOTIFICATION_CLICK is set (see below).
https://pub.dev/packages/firebase_messaging#receiving-messages
So I need to add the data [click_action => FLUTTER_NOTIFICATION_CLICK] to all my notifications on my code, which is dirty, and it couple the code to flutter, which is dirtier.
But if I had an event I could add this data to all notification in only one place (a subscriber), and delete it if the mobile app comes to stop using flutter.
What do you think ?