Skip to content

Commit

Permalink
Fix webhook validity checking logic
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrfv committed Nov 8, 2023
1 parent e552a87 commit 3b01bad
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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}`);
}
Expand Down

0 comments on commit 3b01bad

Please sign in to comment.