Skip to content

Commit

Permalink
fix notification
Browse files Browse the repository at this point in the history
  • Loading branch information
ilvalerione committed Oct 1, 2019
1 parent fb149af commit 4a41918
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Providers/NotificationServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ public function boot()
'data' => [
'channel' => $event->channel,
'notifiable' => get_class($event->notifiable),
],
'response' => $event->response,
]
]);

$this->segments[$event->notification->id] = $segment;
Expand All @@ -43,7 +42,9 @@ public function boot()

$this->app['events']->listen(NotificationSent::class, function (NotificationSent $event) {
if (array_key_exists($event->notification->id, $this->segments)) {
$this->segments[$event->notification->id]->end();
$this->segments[$event->notification->id]
->setContext(['response' => $event->response])
->end();
}
});
}
Expand Down

0 comments on commit 4a41918

Please sign in to comment.