laravel-notification-channels / fcm

Firebase Cloud Messaging (FCM) notifications channel for Laravel
https://laravel-notification-channels.com/
MIT License
472 stars 121 forks source link

Version 4.x breaks Laravel's `NotificationSent` event #178

Closed kohenkatz closed 8 months ago

kohenkatz commented 8 months ago

One of the changes made in #168 is that FcmChannel#send now has a void return type.

This makes Laravel's built-in NotificationSent event useless, because the responses are no longer included in that event object.

As shown in the comments on #29, there can be good reasons to receive success responses, not only failure responses (as are now done with NotificationFailed events).

Please put back returning the FCM results from the send function.

dwightwatson commented 8 months ago

Cool - thanks for bringing that to my attention. I wasn't aware that the return value of send was used for a Laravel event.

I've opened a PR which should address this. Let me know if you have any thoughts on it (and the value I return from send).