Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Thread more imports #187

Merged
merged 4 commits into from
Nov 30, 2023
Merged

Commits on Nov 30, 2023

  1. prepare to import more notes

    `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.
    
    And, for the moment, it's acceptable when importing from *key, because
    the export doesn't contain the instance URL, so we can't resolve ids
    to remote notes.
    
    It's less fine when importing from Mastodon / Pleroma / Akkoma,
    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, so in the (near) future we can use it to properly thread
    imported notes from those services.
    gceccarelli-vt authored and dakkar committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    e392d52 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    15503b9 View commit details
    Browse the repository at this point in the history
  3. fix chaining for Mastodon notes

    the id / replyId are not at the top level, so now `recreateChain`
    takes a list of keys to walk, not just a single key
    dakkar committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    c59e74d View commit details
    Browse the repository at this point in the history
  4. thread Pleroma imports as well

    I have _not_ tested this, but it should work fine, those exports are
    the same shape as Mastodon's
    dakkar committed Nov 30, 2023
    Configuration menu
    Copy the full SHA
    c958d93 View commit details
    Browse the repository at this point in the history