transfem-org / Sharkey

🌎 A Sharkish microblogging platform 🚀
https://joinsharkey.org/
74 stars 19 forks source link

Thread more imports #187

Closed dakkar closed 10 months ago

dakkar commented 10 months ago

As I wrote in #177:

recreateChain converts a list of notes into a forest of notes, using notes that are not replies as roots, and replies as child nodes, recursively.

Previously, notes that are replies to notes not included in the export, and their children, were never put in the forest, and therefore wheren't imported.

This can be fine when importing from Twitter, or *key, since we can't really link a note to a tweet.

It's less fine when importing from Mastodon & Pleroma, because in those cases we can link to the remote note that the user was replying to.

This commit makes recreateChain optionally return "orphaned" note trees, and uses that feature when importing from Mastodon (tested) and Pleroma (should work fine).

Checklist