do not send discord message if there is not url
This commit is contained in:
parent
c0805a285e
commit
01b40b26f5
1 changed files with 3 additions and 0 deletions
|
|
@ -14,6 +14,9 @@ public function send(SendsDiscord $notifiable, Notification $notification): void
|
||||||
{
|
{
|
||||||
$message = $notification->toDiscord($notifiable);
|
$message = $notification->toDiscord($notifiable);
|
||||||
$webhookUrl = $notifiable->routeNotificationForDiscord();
|
$webhookUrl = $notifiable->routeNotificationForDiscord();
|
||||||
|
if (!$webhookUrl) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
dispatch(new SendMessageToDiscordJob($message, $webhookUrl));
|
dispatch(new SendMessageToDiscordJob($message, $webhookUrl));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue