|
@@ -47,7 +47,7 @@ export default class Portal {
|
|
|
if (article.content !== "") {
|
|
|
message += `\n\n${article.content}`;
|
|
|
}
|
|
|
- message += `\n${article.link}`;
|
|
|
+ message += `\n ${Emojis.LINK} ${article.link}`;
|
|
|
|
|
|
if (message.trim().length === 0) {
|
|
|
continue;
|
|
@@ -74,7 +74,7 @@ export default class Portal {
|
|
|
// If the message is more than 400 characters long, its very likely due to the article.content
|
|
|
if (message.length > 400) {
|
|
|
message = `${Emojis.NEWS} ${article.title}.\n\n${article.content}`.substring(0, 397) + "...";
|
|
|
- message += `\n${article.link}`;
|
|
|
+ message += `\n ${Emojis.LINK} ${article.link}`;
|
|
|
}
|
|
|
|
|
|
const mediaIds: any[] = [];
|
|
@@ -87,10 +87,10 @@ export default class Portal {
|
|
|
|
|
|
await this._mastodonClient.v1.statuses.create({ status: message, mediaIds });
|
|
|
await this._redisClient.store(
|
|
|
- article.link.trim(),
|
|
|
+ article.link,
|
|
|
date,
|
|
|
- { EX: this._scraperArticlesOptions.cacheExpiration ? this._scraperArticlesOptions.cacheExpiration : 60 * 60 * 24 }
|
|
|
- ); // EX: 24 hrs expiration
|
|
|
+ { EX: this._scraperArticlesOptions.cacheExpiration ? this._scraperArticlesOptions.cacheExpiration : 60 * 60 * 24 } // EX: 24 hrs expiration
|
|
|
+ );
|
|
|
totalPublished++
|
|
|
}
|
|
|
console.log(`${this._name} | Published ${totalPublished} new articles`);
|