From 0b753d234caff870e7a5fcb5b4bc4fac1a2e1acf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Schimmelpfennig?= Date: Wed, 24 Apr 2024 12:44:14 +0200 Subject: [PATCH 1/2] fix: updating newTimestampId correctly last PR from me introduce an error with the setting newTimestampId, so that's impossible to get new posts :/ --- main.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/main.js b/main.js index fa5f6f2..329979a 100644 --- a/main.js +++ b/main.js @@ -83,15 +83,15 @@ async function fetchNewPosts() { reversed.forEach((item) => { const currentTimestampId = Date.parse(item.published); + if (currentTimestampId > newTimestampId) { + newTimestampId = currentTimestampId; + } + if (currentTimestampId > lastProcessedPostId && lastProcessedPostId != 0) { try { console.log('📧 posting to BlueSky', currentTimestampId) const text = truncate(removeHtmlTags(item.object.content), currentTimestampId); postToBluesky(text); - - if (currentTimestampId > newTimestampId) { - newTimestampId = currentTimestampId; - } } catch (error) { console.error('🔥 can\'t post to Bluesky', currentTimestampId, error) } From 598fb3a7a91483730f2061f48de10db531016ec3 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Wed, 24 Apr 2024 10:45:27 +0000 Subject: [PATCH 2/2] chore(release): 1.1.1 [skip ci] ## [1.1.1](https://github.com/mauricerenck/mastodon-to-bluesky/compare/v1.1.0...v1.1.1) (2024-04-24) ### Bug Fixes * updating newTimestampId correctly ([0b753d2](https://github.com/mauricerenck/mastodon-to-bluesky/commit/0b753d234caff870e7a5fcb5b4bc4fac1a2e1acf)) --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 807e9ce..5a77a53 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +## [1.1.1](https://github.com/mauricerenck/mastodon-to-bluesky/compare/v1.1.0...v1.1.1) (2024-04-24) + + +### Bug Fixes + +* updating newTimestampId correctly ([0b753d2](https://github.com/mauricerenck/mastodon-to-bluesky/commit/0b753d234caff870e7a5fcb5b4bc4fac1a2e1acf)) + # [1.1.0](https://github.com/mauricerenck/mastodon-to-bluesky/compare/v1.0.0...v1.1.0) (2024-04-03)