diff --git a/bot.js b/bot.js index 480dca4..8b48c3c 100644 --- a/bot.js +++ b/bot.js @@ -65,12 +65,9 @@ async function readFeeds() { async function processFeed(feed, postDate) { let count = 0; let validFeeds = feed.items - .filter(async (item) => { + .filter((item) => { let pubDate = new Date(item.pubDate); - - if (pubDate > postDate) { - return item; - } + return pubDate > postDate; }) .slice(0, maxPostPerScan);