do not send discord message if there is not url

This commit is contained in:
Andras Bacsai 2023-08-24 21:00:19 +02:00
parent c0805a285e
commit 01b40b26f5

View file

@ -14,6 +14,9 @@ public function send(SendsDiscord $notifiable, Notification $notification): void
{
$message = $notification->toDiscord($notifiable);
$webhookUrl = $notifiable->routeNotificationForDiscord();
if (!$webhookUrl) {
return;
}
dispatch(new SendMessageToDiscordJob($message, $webhookUrl));
}
}