feat: get Slack Webhook form new table
This commit is contained in:
parent
6cab8b4598
commit
dd9d10c717
1 changed files with 5 additions and 3 deletions
|
|
@ -13,10 +13,12 @@ class SlackChannel
|
|||
public function send(SendsSlack $notifiable, Notification $notification): void
|
||||
{
|
||||
$message = $notification->toSlack();
|
||||
$webhookUrl = $notifiable->routeNotificationForSlack();
|
||||
if (! $webhookUrl) {
|
||||
$slackSettings = $notifiable->slackNotificationSettings;
|
||||
|
||||
if (! $slackSettings || ! $slackSettings->isEnabled() || ! $slackSettings->slack_webhook_url) {
|
||||
return;
|
||||
}
|
||||
SendMessageToSlackJob::dispatch($message, $webhookUrl);
|
||||
|
||||
SendMessageToSlackJob::dispatch($message, $slackSettings->slack_webhook_url);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue