WIP: Don’t pretend internal actors have follow(er|ing) collections #856
No reviewers
Labels
No labels
approved, awaiting change
bug
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs docs
needs tests
not a bug
planned
pleroma_api
privacy
question
static_fe
triage
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: AkkomaGang/akkoma#856
Loading…
Reference in a new issue
No description provided.
Delete branch "Oneric/akkoma:fetch-actor-follow-collections"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Fixes: #855
Afaict this doesn’t affect anything but
internal.fetch
since it appears to be the onlyinternal.
actor and there’s nonill
nickname actor in my DB. In particular the built-in relay actor does not have aninternal.
prefix and thus should just be a regular user with an unusual AP id (/relay
). (Though I’m not using relay functionality)The relay is also an "Application" actor, and its nickname is NULL in my database (so in code I guess represented as this
nickname: nil
)def render("user.json", %{user: %User{nickname: nil} = user}),
So at first glance, this may conflict with the relay actor too. It's possible the relay actor is only created when first enabled. For some reason I vaguely remember something like that, but I could be wrong. So maybe that's why you don't see it in your DB.
Nope, the thing is i checked this before and it does show up, but behold:
I guess whether it gets a nickname or not changed at some point; thanks for pointing this out
Do you by chance have any more, legacy NULL nicknames in your DB?
We could limit omission to just
internal.*
, migrate oldrelay
actors or just keep the omission and check whether we run into any real world problems.There's a bunch NULL nicknames, but relay is the only local one. internal.fetch and relay are also the only local actors of type "Aplication".
In case it's usefull, here's the database entries
Thank you it is helpful and showed yet aother thing: both
relay
andinternal.actor
also are marked asactor_type = Person
in my database °~°(
internal.fetch
still gets exposed as anApplication
though since its special endpoint doesn't even read the property)huh, that shouldn't be the case since #457
But, yeah, that change apparently didn't really do anything wrt federation for the reason you say. I only realised that today when seeing the code in lib/pleroma/web/activity_pub/views/user_view.ex.
it might have done something for
relay
depending on when its nickname stopped beingNULL
The db was definitely created later than this — but
create_service_actor
also doesn't settype: "Application"
atm.Querying
git log -S
reveals: ... PR #457 was accidentally reverted 5 months after it got merged as part of a translation update ineba3cce77b
🥴relay
’s nickname stopped beingNULL
5 years ago in70410dfafd
(subsequently edited again by7dc275b69b
), so your PR last year did affect federation for therelay
actor just notinternal.fetch
I think it’s best to migrate old installs to a non-NULL nickname for consistency (and at the same time re-add #457). Changing the nickname to
internal.relay
while conceptually sensible, is prob a bad idea in practice givenrelay
nicknames are already in use and afaik at least Mastodon doesn't allow for nickname changes.If we do a data migration anyway, we could also stop adding follow collection addresses to
internal*
actors in the first place (delete for existing dbs) and then use values from the db duringrender("service.json", user)
or omit the fields ifNULL
. This seems cleanest and allows for future internal actors with follower collections (whatrelay
probably should’ve been) — though then again we didn't get any new internal actors ever, so it’s unlikely to matterSounds sensible, yes.
If a goal is to use "service.json" for these type of Application actors, you could maybe change the checks
to something like
This makes it more explicit and clearer from the code. It also makes it so that the relay (and possible future Application actors) will use it regardless of nickname.
Don’t pretend internal actors have follow(er|ing) collectionsto WIP: Don’t pretend internal actors have follow(er|ing) collectionsView command line instructions
Checkout
From your project repository, check out a new branch and test the changes.