Browse Source

Skip news updating on news aggregator with config

ghorsington 5 years ago
parent
commit
b69c4a32bc
1 changed files with 6 additions and 0 deletions
  1. 6 0
      bot/src/commands/news_aggregator.ts

+ 6 - 0
bot/src/commands/news_aggregator.ts

@@ -95,6 +95,12 @@ async function addNewsItem(item: NewsPostItem) {
     });
 
     if(newsItem) {
+        if(process.env.INGORE_CHANGED_NEWS === "TRUE") {
+            newsItem.hash = item.hash;
+            await repo.save(newsItem);
+            return;
+        }
+
         // No changes, skip
         if(newsItem.hash == item.hash)
             return;