From 01b40b26f5c2c9ab5dc991b2821de12409fbea47 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Thu, 24 Aug 2023 21:00:19 +0200 Subject: [PATCH] do not send discord message if there is not url --- app/Notifications/Channels/DiscordChannel.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/Notifications/Channels/DiscordChannel.php b/app/Notifications/Channels/DiscordChannel.php index 7032a0796..6c361f89e 100644 --- a/app/Notifications/Channels/DiscordChannel.php +++ b/app/Notifications/Channels/DiscordChannel.php @@ -14,6 +14,9 @@ class DiscordChannel { $message = $notification->toDiscord($notifiable); $webhookUrl = $notifiable->routeNotificationForDiscord(); + if (!$webhookUrl) { + return; + } dispatch(new SendMessageToDiscordJob($message, $webhookUrl)); } }