mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-26 06:04:08 -08:00
checkin notif was missing
This commit is contained in:
parent
832ccc6aa3
commit
4e0d70e0b8
|
@ -175,8 +175,14 @@ class CheckoutableListener
|
||||||
// Send Webhook notification
|
// Send Webhook notification
|
||||||
try {
|
try {
|
||||||
if ($this->shouldSendWebhookNotification()) {
|
if ($this->shouldSendWebhookNotification()) {
|
||||||
Notification::route(Setting::getSettings()->webhook_selected, Setting::getSettings()->webhook_endpoint)
|
if (Setting::getSettings()->webhook_selected === 'microsoft') {
|
||||||
->notify($this->getCheckinNotification($event));
|
$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) {
|
} catch (ClientException $e) {
|
||||||
Log::warning("Exception caught during checkin notification: " . $e->getMessage());
|
Log::warning("Exception caught during checkin notification: " . $e->getMessage());
|
||||||
|
|
Loading…
Reference in a new issue