31
submitted 3 months ago by hongminhee@lemmy.ml to c/fediverse@lemmy.ml
top 2 comments
sorted by: hot top controversial new old
[-] ShittyKopper@lemmy.blahaj.zone 2 points 3 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

[-] hongminhee@lemmy.ml 2 points 3 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!

this post was submitted on 05 Sep 2024
31 points (100.0% liked)

Fediverse

17852 readers
20 users here now

A community dedicated to fediverse news and discussion.

Fediverse is a portmanteau of "federation" and "universe".

Getting started on Fediverse;

founded 5 years ago
MODERATORS