Closed orhun closed 1 year ago
I'd be nice to see this merged
Thanks, fixing this behavior makes sense to me.
I think that is not exactly the right place in the code. The central function for synchronizing posts is determine_posts()
which we can also test without making external API calls. Can you fix it there and add a test case?
We also need to be careful there about the synced status logic. The function is written to go backwards in time through posts and once it encounters the same post on the other platform it stops and assumes everything is synced. So maybe the easiest fix then is to reverse the order at the end of the function.
Thanks for the guidance @klausi! I updated the PR, let me know what you think 🐻
Great work @orhun , thanks a lot!
I added some more code comments about post ordering, let me know if we should improve something on that.
Looks good, thanks for the merge! 🚀
I ran
mastodon-twitter-sync
for the first time and it started posting my tweets to Mastodon in reverse order.This PR fixes this issue and processes the tweets/toots in chronological order.