A free open source IT asset/license management system
clean up variables
Godfrey M4ff5fc1ff952
diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.phpindex 5c7e772976..6f9e867af1 100644--- a/app/Listeners/CheckoutableListener.php+++ b/app/Listeners/CheckoutableListener.php@@ -50,7 +50,7 @@ class CheckoutableListenerforeach ($notifiables as $notifiable) {if ($notifiable instanceof User && $notifiable->email != '') {if (! $event->checkedOutTo->locale){- Notification::locale(Setting::getSettings()->locale)->send($notifiables, $this->getCheckoutNotification($event, $acceptance));+ Notification::locale(Setting::getSettings()->locale)->send($notifiable, $this->getCheckoutNotification($event, $acceptance));}else {Notification::send($notifiable, $this->getCheckoutNotification($event, $acceptance));@@ -63,7 +63,7 @@ class CheckoutableListener// Slack doesn't include the URL in its messaging format, so this is needed to hit the endpointif (Setting::getSettings()->webhook_selected === 'slack' || Setting::getSettings()->webhook_selected === 'general') {Notification::route('slack', Setting::getSettings()->webhook_endpoint)- ->notify($this->getCheckoutNotification($event));+ ->notify($this->getCheckoutNotification($event, $acceptance));} else {Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint)->notify($this->getCheckoutNotification($event, $acceptance));@@ -102,17 +102,17 @@ class CheckoutableListener}}}- $acceptance = $this->getCheckoutAcceptance($event);+$notifiables = $this->getNotifiables($event);// Send email notificationstry {foreach ($notifiables as $notifiable) {if ($notifiable instanceof User && $notifiable->email != '') {if (! $event->checkedOutTo->locale){- Notification::locale(Setting::getSettings()->locale)->send($notifiables, $this->getCheckoutNotification($event, $acceptance));+ Notification::locale(Setting::getSettings()->locale)->send($notifiable, $this->getCheckoutNotification($event, $acceptance));}else {- Notification::send($notifiable, $this->getCheckinNotification($event, $acceptance));+ Notification::send($notifiable, $this->getCheckinNotification($event));}}}@@ -124,7 +124,7 @@ class CheckoutableListener->notify($this->getCheckinNotification($event));} else {Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint)- ->notify($this->getCheckinNotification($event, $acceptance));+ ->notify($this->getCheckinNotification($event));}}