Merge pull request #14187 from Godmartinz/general-hook_fix
Fixed the general webhook not notifying anymore
This commit is contained in:
commit
849ba02516
8 changed files with 11 additions and 7 deletions
|
@ -60,8 +60,10 @@ class CheckoutableListener
|
||||||
if ($this->shouldSendWebhookNotification()) {
|
if ($this->shouldSendWebhookNotification()) {
|
||||||
|
|
||||||
//slack doesn't include the url in its messaging format so this is needed to hit the endpoint
|
//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') {
|
if(Setting::getSettings()->webhook_selected =='slack' || Setting::getSettings()->webhook_selected =='general') {
|
||||||
|
|
||||||
|
|
||||||
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
|
Notification::route('slack', Setting::getSettings()->webhook_endpoint)
|
||||||
->notify($this->getCheckoutNotification($event));
|
->notify($this->getCheckoutNotification($event));
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@ class CheckinAccessoryNotification extends Notification
|
||||||
$notifyBy[] = MicrosoftTeamsChannel::class;
|
$notifyBy[] = MicrosoftTeamsChannel::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Setting::getSettings()->webhook_selected == 'slack') {
|
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
|
||||||
$notifyBy[] = 'slack';
|
$notifyBy[] = 'slack';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ class CheckinAssetNotification extends Notification
|
||||||
|
|
||||||
$notifyBy[] = MicrosoftTeamsChannel::class;
|
$notifyBy[] = MicrosoftTeamsChannel::class;
|
||||||
}
|
}
|
||||||
if (Setting::getSettings()->webhook_selected == 'slack') {
|
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
|
||||||
\Log::debug('use webhook');
|
\Log::debug('use webhook');
|
||||||
$notifyBy[] = 'slack';
|
$notifyBy[] = 'slack';
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ class CheckinLicenseSeatNotification extends Notification
|
||||||
$notifyBy[] = MicrosoftTeamsChannel::class;
|
$notifyBy[] = MicrosoftTeamsChannel::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Setting::getSettings()->webhook_selected == 'slack') {
|
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
|
||||||
$notifyBy[] = 'slack';
|
$notifyBy[] = 'slack';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,7 @@ class CheckoutAccessoryNotification extends Notification
|
||||||
$notifyBy[] = MicrosoftTeamsChannel::class;
|
$notifyBy[] = MicrosoftTeamsChannel::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Setting::getSettings()->webhook_selected == 'slack') {
|
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
|
||||||
$notifyBy[] = 'slack';
|
$notifyBy[] = 'slack';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,9 @@ class CheckoutAssetNotification extends Notification
|
||||||
$notifyBy[] = MicrosoftTeamsChannel::class;
|
$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');
|
\Log::debug('use webhook');
|
||||||
$notifyBy[] = 'slack';
|
$notifyBy[] = 'slack';
|
||||||
}
|
}
|
||||||
|
|
|
@ -59,7 +59,7 @@ class CheckoutConsumableNotification extends Notification
|
||||||
$notifyBy[] = MicrosoftTeamsChannel::class;
|
$notifyBy[] = MicrosoftTeamsChannel::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Setting::getSettings()->webhook_selected == 'slack') {
|
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
|
||||||
$notifyBy[] = 'slack';
|
$notifyBy[] = 'slack';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ class CheckoutLicenseSeatNotification extends Notification
|
||||||
$notifyBy[] = MicrosoftTeamsChannel::class;
|
$notifyBy[] = MicrosoftTeamsChannel::class;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Setting::getSettings()->webhook_selected == 'slack') {
|
if (Setting::getSettings()->webhook_selected == 'slack' || Setting::getSettings()->webhook_selected == 'general' ) {
|
||||||
$notifyBy[] = 'slack';
|
$notifyBy[] = 'slack';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue