Merge pull request 'Don't list old accounts as aliases in WebFinger' (#713) from erincandescent/akkoma:no-old-account-alias into develop
Some checks are pending
ci/woodpecker/push/build-amd64 Pipeline is pending
ci/woodpecker/push/build-arm64 Pipeline is pending
ci/woodpecker/push/docs Pipeline is pending
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test Pipeline is pending

Reviewed-on: #713
This commit is contained in:
floatingghost 2024-04-12 18:34:14 +00:00
commit 024ffadd80
2 changed files with 2 additions and 4 deletions

View file

@ -65,7 +65,7 @@ defp gather_links(%User{} = user) do
end end
defp gather_aliases(%User{} = user) do defp gather_aliases(%User{} = user) do
[user.ap_id | user.also_known_as] [user.ap_id]
end end
def represent_user(user, "JSON") do def represent_user(user, "JSON") do

View file

@ -46,8 +46,7 @@ test "Webfinger JRD" do
assert response["subject"] == "acct:#{user.nickname}@localhost" assert response["subject"] == "acct:#{user.nickname}@localhost"
assert response["aliases"] == [ assert response["aliases"] == [
"https://hyrule.world/users/zelda", "https://hyrule.world/users/zelda"
"https://mushroom.kingdom/users/toad"
] ]
end end
@ -104,7 +103,6 @@ test "Webfinger XML" do
|> response(200) |> response(200)
assert response =~ "<Alias>https://hyrule.world/users/zelda</Alias>" assert response =~ "<Alias>https://hyrule.world/users/zelda</Alias>"
assert response =~ "<Alias>https://mushroom.kingdom/users/toad</Alias>"
end end
test "it returns 404 when user isn't found (XML)" do test "it returns 404 when user isn't found (XML)" do