Merge 49eb29b463
into 28a8829128
This commit is contained in:
commit
ed4e7cfdd5
1 changed files with 4 additions and 2 deletions
6
main.js
6
main.js
|
@ -64,7 +64,7 @@ async function fetchNewPosts() {
|
|||
|
||||
let newTimestampId = 0;
|
||||
|
||||
reversed.forEach(item => {
|
||||
for(let item of reversed) {
|
||||
const currentTimestampId = Date.parse(item.published);
|
||||
|
||||
if(currentTimestampId > newTimestampId) {
|
||||
|
@ -73,7 +73,9 @@ async function fetchNewPosts() {
|
|||
|
||||
if(currentTimestampId > lastProcessedPostId && lastProcessedPostId != 0) {
|
||||
const text = removeHtmlTags(item.object.content);
|
||||
postToBluesky(text);
|
||||
await postToBluesky(text);
|
||||
lastProcessedPostId = newTimestampId;
|
||||
await saveLastProcessedPostId();
|
||||
}
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in a new issue