fixing filter issue

This commit is contained in:
Michael (GP) 2022-12-14 18:10:14 -05:00
parent 1916ac93e7
commit 8e99a2b491

7
bot.js
View File

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