Merge pull request 'Don't list old accounts as aliases in WebFinger' (#713) from erincandescent/akkoma:no-old-account-alias into develop
Reviewed-on: #713
This commit is contained in:
commit
024ffadd80
2 changed files with 2 additions and 4 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue