This commit is contained in:
Nathan Friedly 2024-03-13 16:46:55 -04:00 committed by GitHub
commit ed4e7cfdd5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,7 +64,7 @@ async function fetchNewPosts() {
let newTimestampId = 0; let newTimestampId = 0;
reversed.forEach(item => { for(let item of reversed) {
const currentTimestampId = Date.parse(item.published); const currentTimestampId = Date.parse(item.published);
if(currentTimestampId > newTimestampId) { if(currentTimestampId > newTimestampId) {
@ -73,7 +73,9 @@ async function fetchNewPosts() {
if(currentTimestampId > lastProcessedPostId && lastProcessedPostId != 0) { if(currentTimestampId > lastProcessedPostId && lastProcessedPostId != 0) {
const text = removeHtmlTags(item.object.content); const text = removeHtmlTags(item.object.content);
postToBluesky(text); await postToBluesky(text);
lastProcessedPostId = newTimestampId;
await saveLastProcessedPostId();
} }
}) })