From 01b6c7497b63cde5f73e698132765c3b0bd60153 Mon Sep 17 00:00:00 2001 From: zugdev Date: Fri, 10 Jan 2025 03:56:48 -0300 Subject: [PATCH] feat: even better logs --- src/home/rendering/render-github-notifications.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/home/rendering/render-github-notifications.ts b/src/home/rendering/render-github-notifications.ts index 7242c49..767c9fe 100644 --- a/src/home/rendering/render-github-notifications.ts +++ b/src/home/rendering/render-github-notifications.ts @@ -98,8 +98,12 @@ function everyNewNotification({ const commentData = commentsMap.get(notification.notification.id.toString()); - if ((!commentData || commentData.commentBody === "") || (commentData.userType === "Bot" && !showBotNotifications)){ - console.log("skipping ", notification.notification.subject.title, " because of empty comment or bot notification"); + if (!commentData || (commentData.userType === "Bot" && !showBotNotifications)) { + console.log("skipping ", notification.notification.subject.title, " because of bot notification"); + return; + } + if (commentData.commentBody === ""){ + console.log("skipping ", notification.notification.subject.title, " because of empty comment"); return; }