Closed kai17 closed 10 months ago
I'll look into that. I added some checks in the codebase, they are already passing... 🤔
A fixed has been merge regarding the duplication. It was related to a cache migration failure. If you want to start the sync from a specific tweet, you can add the following in your cache file:
{
...
posts: {
...
"yourTweetIdHere": {
mastodon: ["correspondingMastodonId"]
}
...
}
...
}
Thank you again. I just pulled from github and ran the script again, but the result is the same (see the attached screenshot). The first part of the tweet (w/ot the link) is posted again on Bluesky (now for the 9th time), then the script hangs for a few seconds and terminates. Should I try deleting the cache and/or reinstall from scratch?
Sounds like the AtProto relies on Graphemer to count text length, not on a simple string.length
.
From what I see, the atProto checks the text length using the following code:
// counts the number of graphemes (user-displayed characters) in a string
export const graphemeLen = (str: string): number => {
const splitter = new Graphemer()
return splitter.countGraphemes(str)
}
Thanks to your issue & details, I'll try to reproduce & find a fix
@kai17 I let you test the latest codebase or dev
tag on docker
Feel free to reopen
With the latest version (commit cceb9d), touitomamout pulls the tweets from https://twitter.com/kai_arzheimer and reposts them at https://bsky.app/profile/kaiarzheimer.bsky.social. However, it chokes on this tweet https://twitter.com/kai_arzheimer/status/1716520276488249713 with an error about using more than 300 graphemes (the tweet is definitively shorter). The script than hangs for a few seconds before terminating. My more recent tweets do not get synchronised. Instead, my older tweets get duplicated on Bluesky.