fix for general webhook not notifiying anymore

This commit is contained in:
Godfrey M 2024-01-30 10:47:18 -08:00
parent 3da7876631
commit 22385a8e35
8 changed files with 8 additions and 8 deletions

View file

@ -60,7 +60,7 @@ class CheckoutableListener
if ($this->shouldSendWebhookNotification()) {
//slack doesn't include the url in its messaging format so this is needed to hit the endpoint
if(Setting::getSettings()->webhook_selected =='slack') {
if(Setting::getSettings()->webhook_selected !='microsoft') {
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
->notify($this->getCheckoutNotification($event));

View file

@ -44,7 +44,7 @@ class CheckinAccessoryNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_selected == 'slack') {
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
$notifyBy[] = 'slack';
}

View file

@ -51,7 +51,7 @@ class CheckinAssetNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_selected == 'slack') {
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
\Log::debug('use webhook');
$notifyBy[] = 'slack';
}

View file

@ -48,7 +48,7 @@ class CheckinLicenseSeatNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_selected == 'slack') {
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
$notifyBy[] = 'slack';
}

View file

@ -43,7 +43,7 @@ class CheckoutAccessoryNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_selected == 'slack') {
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
$notifyBy[] = 'slack';
}

View file

@ -60,7 +60,7 @@ class CheckoutAssetNotification extends Notification
}
$notifyBy = [];
if ((Setting::getSettings()) && (Setting::getSettings()->webhook_selected == 'slack')) {
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
\Log::debug('use webhook');
$notifyBy[] = 'slack';
}

View file

@ -50,7 +50,7 @@ class CheckoutConsumableNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_selected == 'slack') {
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
$notifyBy[] = 'slack';
}

View file

@ -51,7 +51,7 @@ class CheckoutLicenseSeatNotification extends Notification
$notifyBy[] = MicrosoftTeamsChannel::class;
}
if (Setting::getSettings()->webhook_selected == 'slack') {
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
$notifyBy[] = 'slack';
}