fixing filter issue
This commit is contained in:
parent
1916ac93e7
commit
8e99a2b491
7
bot.js
7
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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user