Skip to content

Commit 4625ef3

Browse files
committed
remove events since they are now fired in laravel core
1 parent da739ea commit 4625ef3

File tree

3 files changed

+0
-58
lines changed

3 files changed

+0
-58
lines changed

src/Events/MessageWasSent.php

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

src/Events/SendingMessage.php

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

src/WebPushChannel.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
use Minishlink\WebPush\WebPush;
66
use Illuminate\Notifications\Notification;
7-
use NotificationChannels\WebPush\Events\MessageWasSent;
8-
use NotificationChannels\WebPush\Events\SendingMessage;
97

108
class WebPushChannel
119
{
@@ -30,12 +28,6 @@ public function __construct(WebPush $webPush)
3028
*/
3129
public function send($notifiable, Notification $notification)
3230
{
33-
$shouldSendMessage = event(new SendingMessage($notifiable, $notification), [], true) !== false;
34-
35-
if (! $shouldSendMessage) {
36-
return;
37-
}
38-
3931
$subscriptions = $notifiable->routeNotificationFor('WebPush');
4032

4133
if ($subscriptions->isEmpty()) {
@@ -56,8 +48,6 @@ public function send($notifiable, Notification $notification)
5648
$response = $this->webPush->flush();
5749

5850
$this->deleteInvalidSubscriptions($response, $subscriptions);
59-
60-
event(new MessageWasSent($notifiable, $notification));
6151
}
6252

6353
/**

0 commit comments

Comments
 (0)