Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose categories to the fediverse (Group actors; FEP-1b12) #12434

Open
julianlam opened this issue Mar 21, 2024 · 4 comments
Open

Expose categories to the fediverse (Group actors; FEP-1b12) #12434

julianlam opened this issue Mar 21, 2024 · 4 comments
Assignees

Comments

@julianlam
Copy link
Member

julianlam commented Mar 21, 2024

FEP document

Main Concerns

  1. Handle namespace collision
    • Users and groups share a common slug namespace as they can be mentioned. We use a similar constraint for fediverse handles (the user slug is their handle).
    • If we introduce categories as followable actors in the fediverse, they also need handles, which would naturally be their slug, but right now there is no collision detection — multiple categories can share the same slug, a slug is just an SEO-optimized string for the URL.
    • An upgrade script will need to find collisions and generate a new handle.
  2. Handle cannot be edited by admins
    • The slug is just generated once when Categories.create is called, and that value is (hopefully) used elsewhere as-needed.
    • Admin may want to pick their own handle on creation/update
@julianlam julianlam self-assigned this Mar 21, 2024
@julianlam
Copy link
Member Author

On the topic of slug collisions, the easiest way for an upgrade script to proceed would be to iterate through all categories and rename any that have collisions. This will also serve a dual function of populating a new categoryslug:cid zset.

@julianlam
Copy link
Member Author

A category slug is actually handled a little differently, it is the cid and an url-safe slug joined with a /, and is only used in the URL.

A more suitable alternative would be to introduce a new field called handle into the category object.

@julianlam
Copy link
Member Author

Now working but needs cleanup... in particular the announce logic used in Notes.assert is similar to the logic found in api.activitypub.create.post

Potential for deduplication.

@julianlam
Copy link
Member Author

With the potential advent of FEP-9988 "Federated Forums", I will suspend work on 1b12 conformance for the time being.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant