mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 21:54:14 -08:00
fix for general webhook not notifiying anymore
This commit is contained in:
parent
3da7876631
commit
22385a8e35
|
@ -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));
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
|
@ -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';
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue