kreait / firebase-bundle

A Symfony Bundle for the Firebase PHP Admin SDK
https://github.com/kreait/firebase-php
MIT License
135 stars 25 forks source link

[feature request] Trigger Event(s) #29

Open johndodev opened 3 years ago

johndodev commented 3 years ago

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 ?

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 1 year ago

There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale. Please make sure to update to the latest version and check if that solves the issue. Let me know if that works for you by leaving a 👍. Because this issue is marked as stale, it will be closed and locked in 7 days if no further activity occurs. Thank you for your contributions!