Add default text if the post.content variable is empty

This commit is contained in:
Logan Cusano
2023-03-31 20:20:32 -04:00
parent 8a417d9ed7
commit 46ff0f49e8

View File

@@ -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);