Fix webhook validity checking logic

This commit is contained in:
mrrfv
2023-11-08 22:44:19 +01:00
parent e552a8730f
commit 3b01badd8f
+1 -1
View File
@@ -59,7 +59,7 @@ export async function notifyWebhook(msg) {
// Check if the webhook URL exists
const webhook_url = process.env.DISCORD_WEBHOOK_URL;
if (webhook_url || !webhook_url.startsWith('http')) {
if (webhook_url && webhook_url.startsWith('http')) {
// Send the message to the webhook
await sendMessageToWebhook(webhook_url, `CGPS: ${msg}`);
}