Skip to content

Commit 4dcb22d

Browse files
committed
remove events
1 parent bf31987 commit 4dcb22d

File tree

3 files changed

+0
-66
lines changed

3 files changed

+0
-66
lines changed

src/Events/MessageWasSent.php

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/Events/SendingMessage.php

Lines changed: 0 additions & 25 deletions
This file was deleted.

src/PusherChannel.php

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@ public function send($notifiable, Notification $notification)
3535
$interest = $notifiable->routeNotificationFor('PusherPushNotifications')
3636
?: $this->interestName($notifiable);
3737

38-
if (! $this->shouldSendMessage($notifiable, $notification)) {
39-
return;
40-
}
41-
4238
$response = $this->pusher->notify(
4339
$interest,
4440
$notification->toPushNotification($notifiable)->toArray(),
@@ -48,8 +44,6 @@ public function send($notifiable, Notification $notification)
4844
if (! in_array($response['status'], [200, 202])) {
4945
throw CouldNotSendNotification::pusherRespondedWithAnError($response);
5046
}
51-
52-
event(new MessageWasSent($notifiable, $notification));
5347
}
5448

5549
/**
@@ -65,14 +59,4 @@ protected function interestName($notifiable)
6559

6660
return $class.'.'.$notifiable->getKey();
6761
}
68-
69-
/**
70-
* Check if we can send the notification.
71-
*
72-
* @return bool
73-
*/
74-
protected function shouldSendMessage($notifiable, $notification)
75-
{
76-
return event(new SendingMessage($notifiable, $notification), [], true) !== false;
77-
}
7862
}

0 commit comments

Comments
 (0)