Browse Source

Don't spam the channel with "article content is too long"

shorten
Alexander Yakovlev 3 years ago
parent
commit
e2f36f65f4
  1. 4
      app/models/feed-data.js

4
app/models/feed-data.js

@ -111,7 +111,7 @@ function formatPost(article) {
let message = "";
if (article.title) message += `\n**${article.title}**`;
if (article.content) message += article.content.length > Config.charLimit ? "\nArticle content too long for a single Discord message!" : `\n${article.content}`;
if (article.content) message += article.content.length > Config.charLimit ? "" : `\n${article.content}`;
if (article.link) message += `\n\n${normaliseUrlForDiscord(article.link)}`;
return message;
@ -135,4 +135,4 @@ function normaliseYouTubeUrl(origUrl, parsedUrl) {
function normaliseUrlForCache(url) {
return normaliseUrlForDiscord(url).replace(/^((https?:\/\/)?(www.)?)/, "");
}
}
Loading…
Cancel
Save