Skip to content

Commit

Permalink
Merge pull request #11 from TAGHREEDAA/fix-notification-sent-before-s…
Browse files Browse the repository at this point in the history
…ending

Fix NotificationSent event is fired before NotificationSending
  • Loading branch information
jamesmills authored Jan 7, 2021
2 parents 52b4d60 + 5d4ae20 commit 1caa76f
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/RateLimitChannelManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,12 @@
namespace Jamesmills\LaravelNotificationRateLimit;

use Illuminate\Notifications\ChannelManager;
use Illuminate\Notifications\Events\NotificationSent;

class RateLimitChannelManager extends ChannelManager
{
public function send($notifiables, $notification)
{
if ($this->checkRateLimit($notifiables, $notification)) {
event(new NotificationSent($notifiables, $notification, $this->channel()));
parent::send($notifiables, $notification);
}
}
Expand Down

0 comments on commit 1caa76f

Please sign in to comment.