fixing typo in return value
This commit is contained in:
parent
0df54e58b4
commit
47caf810d4
12
bot.js
12
bot.js
@ -34,7 +34,6 @@ async function postFeed() {
|
|||||||
let postDate = new Date(timeline.data[0].created_at);
|
let postDate = new Date(timeline.data[0].created_at);
|
||||||
|
|
||||||
let count = 0;
|
let count = 0;
|
||||||
let feedResults = await Promise.all(
|
|
||||||
feed.items.every(async (item) => {
|
feed.items.every(async (item) => {
|
||||||
let pubDate = new Date(item.pubDate);
|
let pubDate = new Date(item.pubDate);
|
||||||
|
|
||||||
@ -43,15 +42,14 @@ async function postFeed() {
|
|||||||
|
|
||||||
if (count > maxPostPerScan) return false;
|
if (count > maxPostPerScan) return false;
|
||||||
|
|
||||||
let posts = await M.post("statuses", {
|
await M.post("statuses", {
|
||||||
status: `${item.title}\n\n#NeoVibe #${process.env.POST_HASHTAG}\n\n${item.link}`,
|
status: `${item.title}\n\n#NeoVibe #${process.env.POST_HASHTAG}\n\n${item.link}`,
|
||||||
});
|
});
|
||||||
return posts;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return true;
|
||||||
})
|
});
|
||||||
);
|
|
||||||
|
|
||||||
return feedResults;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user