mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
Fire webhook notification after sending emails
This commit is contained in:
parent
47a77eabf2
commit
ab3a3de59b
|
@ -45,11 +45,6 @@ class CheckoutableListener
|
|||
$acceptance = $this->getCheckoutAcceptance($event);
|
||||
|
||||
try {
|
||||
if ($this->shouldSendWebhookNotification()) {
|
||||
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
|
||||
->notify($this->getCheckoutNotification($event));
|
||||
}
|
||||
|
||||
if (! $event->checkedOutTo->locale) {
|
||||
Notification::locale(Setting::getSettings()->locale)->send(
|
||||
$this->getNotifiables($event),
|
||||
|
@ -61,6 +56,11 @@ class CheckoutableListener
|
|||
$this->getCheckoutNotification($event, $acceptance)
|
||||
);
|
||||
}
|
||||
|
||||
if ($this->shouldSendWebhookNotification()) {
|
||||
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
|
||||
->notify($this->getCheckoutNotification($event));
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
if ($e instanceof ClientException){
|
||||
$statusCode = $e->getResponse()->getStatusCode();
|
||||
|
|
Loading…
Reference in a new issue