Skip to content

import more *Key notes

Ghost User requested to merge gh-b77c0252/177/unknown/refs/pull/177/head into develop

Created by: dakkar

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, since we can't really link a note to a tweet.

It's less fine when importing from *key, 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 *key.

NOTE: I have not tested this with an import, but I have tested the function in isolation.

Checklist

  • Read the contribution guide
  • Test working in a local environment
  • (If needed) Add story of storybook
  • (If needed) Update CHANGELOG.md
  • (If possible) Add tests

Merge request reports