• kopper [they/them]@lemmy.blahaj.zone
    link
    fedilink
    English
    arrow-up
    0
    ·
    4 months ago

    i’m pretty excited for fedify since i’m unsure if there has been any other activitypub abstraction that feels as comprehensive as it seems right now (from a brief skim, anyway).

    one thing i had in mind ever since i first skimmed the docs some time ago is this:

    federation.setActorDispatcher("/users/{handle}", async (ctx, handle) => {
    

    i would really recommend you to NOT tell people to use handles here. i assume this is just naming and the framework doesn’t actually require a handle there, but documentation matters and if you follow on the footsteps of mastodon, pleroma, lemmy, and friends everyone who follows your docs will lose the ability to change usernames down the line without more pain than it’s worth (and yes, there are software out there that allow it right now! please do not build fedi software assuming usernames are immutable jsut because mastodon doesn’t let people do it)

    just like how you wouldn’t use a natural key in a database, you should tell people to use a surrogate key like an autoincrement id or a uuid on the actor IDs, as they’re effectively permanent. while it may be probably fine for a quickstart thing like this to omit that, a lot of permanent codebases do start up by following these kinds of guides, and nudging people to do the correct thing when it’s not that hard is always a good idea IMO

    • 洪 民憙 (Hong Minhee)@lemmy.mlOP
      link
      fedilink
      arrow-up
      0
      ·
      4 months ago

      Thank you for your advice. As you mentioned, Fedify currently has actor URIs consisting of handles. This limitation is due to the early design of Fedify and will be fixed before we release v1.0!