From 46ff0f49e82cd574dc28a854f996014c5f47f782 Mon Sep 17 00:00:00 2001 From: Logan Cusano Date: Fri, 31 Mar 2023 20:20:32 -0400 Subject: [PATCH] Add default text if the post.content variable is empty --- libUtils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/libUtils.js b/libUtils.js index 0434a41..60226a6 100644 --- a/libUtils.js +++ b/libUtils.js @@ -89,6 +89,7 @@ exports.sendPost = (post, source, channel, callback) => { else if (postText.length === 0) postText = `*This post has no content* [Direct Link](${post.link})`; postContent = postText; } + else postText = `*This post has no content* [Direct Link](${post.link})`; // Check for embedded youtube videos and add the first four as links const ytVideos = String(post.content).match(youtubeVideoRegex);