feat: get discord Webhook form new table
This commit is contained in:
@@ -13,10 +13,13 @@ class DiscordChannel
|
||||
public function send(SendsDiscord $notifiable, Notification $notification): void
|
||||
{
|
||||
$message = $notification->toDiscord();
|
||||
$webhookUrl = $notifiable->routeNotificationForDiscord();
|
||||
if (! $webhookUrl) {
|
||||
|
||||
$discordSettings = $notifiable->discordNotificationSettings;
|
||||
|
||||
if (! $discordSettings || ! $discordSettings->isEnabled() || ! $discordSettings->discord_webhook_url) {
|
||||
return;
|
||||
}
|
||||
SendMessageToDiscordJob::dispatch($message, $webhookUrl);
|
||||
|
||||
SendMessageToDiscordJob::dispatch($message, $discordSettings->discord_webhook_url);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user