Don’t pretend internal actors have follow(er|ing) collections #856
No reviewers
Labels
No labels
approved, awaiting change
bug
cannot reproduce
configuration
documentation
duplicate
enhancement
extremely low priority
feature request
Fix it yourself
help wanted
invalid
mastodon_api
needs change/feedback
needs docs
needs tests
not a bug
not our 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…
Add table
Add a link
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.fetchsince it appears to be the onlyinternal.actor and there’s nonillnickname 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 oldrelayactors 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
relayandinternal.actoralso are marked asactor_type = Personin my database °~°(
internal.fetchstill gets exposed as anApplicationthough 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
relaydepending on when its nickname stopped beingNULLThe db was definitely created later than this — but
create_service_actoralso doesn't settype: "Application"atm.Querying
git log -Sreveals: ... PR #457 was accidentally reverted 5 months after it got merged as part of a translation update ineba3cce77b🥴relay’s nickname stopped beingNULL5 years ago in70410dfafd(subsequently edited again by7dc275b69b), so your PR last year did affect federation for therelayactor just notinternal.fetchI 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.relaywhile conceptually sensible, is prob a bad idea in practice givenrelaynicknames 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 (whatrelayprobably 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) collections778e0ef196e342b67e6dWIP: Don’t pretend internal actors have follow(er|ing) collectionsto Don’t pretend internal actors have follow(er|ing) collectionsImplemented the discussed changes; it’d be great if you could confirm this works as intended on your old instance @ilja
e342b67e6d9f51f67fda9f51f67fda523c59fede523c59fedecaf6b4606fI switched to develop, then merged 'oneric/fetch-actor-follow-collections'.
Before the switch:
After the switch:
This shows that the followers and following collection is gone from
internal.fetch, but not fromrelay. When I check my database, I see thatinternal.fetchhas NULL for both addresses, while forrelaythey are both filled in. If I understand correctly, this was the goal, so yeay! I'll run for a while. I don't think I'll notice if the relay breaks (it's on, but I don't personally use it for anything myself and I'm unsure if anyone really does), but at least internal.fetch should be noticeable if I get federation problems.