feat: get Slack Webhook form new table
This commit is contained in:
@@ -13,10 +13,12 @@ class SlackChannel
|
|||||||
public function send(SendsSlack $notifiable, Notification $notification): void
|
public function send(SendsSlack $notifiable, Notification $notification): void
|
||||||
{
|
{
|
||||||
$message = $notification->toSlack();
|
$message = $notification->toSlack();
|
||||||
$webhookUrl = $notifiable->routeNotificationForSlack();
|
$slackSettings = $notifiable->slackNotificationSettings;
|
||||||
if (! $webhookUrl) {
|
|
||||||
|
if (! $slackSettings || ! $slackSettings->isEnabled() || ! $slackSettings->slack_webhook_url) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
SendMessageToSlackJob::dispatch($message, $webhookUrl);
|
|
||||||
|
SendMessageToSlackJob::dispatch($message, $slackSettings->slack_webhook_url);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user