Open natsukagami opened 1 year ago
Thanks for writing this up!
Just jotting this down now while it's on my mind:
Currently we have a db function that selects account by URL, and assumes that account URL is unique. Currently, this function is called in two places -- here and here.
Once we relax the URL unique requirement, it is possible that the db SELECT call will return more than one account, so we'll need to adjust the above function calls to also anticipate this. For the search one, it's fine if the 'GetAccountByURL' call returns more than one account, since we can just return multiple results via the search then.
For the other one, it's a bit more complicated since it's used to dereference an account from remote, and there's not really a way of knowing which account will be returned, or which account the caller actually wants.
Not sure right now how to resolve this, just something to bear in mind when we make this change :)
Just to add another data point in terms of places this causes problems: Bridgy Fed's general and bluesky-specific opt-in bots share the same URL but different URIs/IDs, so if a GTS instance has already seen one, it can't add the second with this current constraint.
Describe the bug with a clear and concise description of what the bug is.
Writefreely instances with
single_user
mode enabled will WebFinger the only user and the internal instance account with the same URL.This is giving GtS a hard time trying to follow the blog, since it cannot create a new account: GtS assumes and enforces that each account has an unique URL field.
Writefreely's webfinger output, from the discussion on the Matrix channel (on the now deceased Writefreely instance https://write.nkagami.me)
What's your GoToSocial Version?
v0.9.0-rc1
GoToSocial Arch
amd64 Binary
What happened?
GtS is returning a 401 at this point
https://github.com/superseriousbusiness/gotosocial/blob/c7702c47bb887a220233fd92d80a1084a25f2a27/internal/processing/fedi/user.go#L60
(Probably would be nice to have a log written down here as well :D)
What you expected to happen?
No response
How to reproduce it?
No response
Anything else we need to know?
No response