Merge pull request #14187 from Godmartinz/general-hook_fix

Fixed the general webhook not notifying anymore
This commit is contained in:
snipe 2024-02-08 23:01:36 +00:00 committed by GitHub
commit 849ba02516
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 11 additions and 7 deletions

View file

@ -60,8 +60,10 @@ 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' || Setting::getSettings()->webhook_selected =='general') {
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
->notify($this->getCheckoutNotification($event));
}

View file

@ -53,7 +53,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

@ -60,7 +60,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

@ -57,7 +57,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

@ -52,7 +52,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

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

View file

@ -59,7 +59,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

@ -59,7 +59,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';
}