fedifinder
fedifinder copied to clipboard
Some profile URLs are broken
Instead of putting them together from the webfinger version, use the original URLs from the profiles. But those aren't always URLs.
local_domain from #87 fixes redirected mastodon instances, but other software has different url structures. Those could only be found through webfinger, but webfinger returns the result for that specific account, not the general url structure.
Maybe look for the username in the profile url and use that to determine the correct pattern? eg "@[email protected] returns" returns "https://vis.social/@Luca" and "https://vis.social/users/Luca" -> removing "Luca" gives us "https://vis.social/@" and "https://vis.social/users/".
With Peertube "@[email protected]" would return "https://sub.domain.tld/video-channels/name".
But how can we be sure that all fediverse software uses the username in their url? What happens if there is an ID instead? Not storing a profile pattern if the name isn't in the url would work. What happens if there is a name and an ID? The name would be found and then the ID would be stored as an general pattern and expose specific users. That's not an option.
Maybe collecting patterns per software and then test which pattern a specific account uses so only known patterns would be used. Could work, but needs lots of manual review.