A free open source IT asset/license management system
checkin notif was missing
Godfrey M4e0d70e0b843
diff --git a/app/Listeners/CheckoutableListener.php b/app/Listeners/CheckoutableListener.phpindex 8fa96acb6a..79a4774776 100644--- a/app/Listeners/CheckoutableListener.php+++ b/app/Listeners/CheckoutableListener.php@@ -175,8 +175,14 @@ class CheckoutableListener// Send Webhook notificationtry {if ($this->shouldSendWebhookNotification()) {- Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint)- ->notify($this->getCheckinNotification($event));+ if (Setting::getSettings()->webhook_selected === 'microsoft') {+ $message = $this->getCheckinNotification($event)->toMicrosoftTeams();+ $notification = new TeamsNotification(Setting::getSettings()->webhook_endpoint);+ $notification->success()->sendMessage($message[0], $message[1]); // Send the message to Microsoft Teams+ } else {+ Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint)+ ->notify($this->getCheckinNotification($event, $acceptance));+ }}} catch (ClientException $e) {Log::warning("Exception caught during checkin notification: " . $e->getMessage());