mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-08 17:34:19 +00:00
Merge pull request 'Don't list old accounts as aliases in WebFinger' (#713) from erincandescent/akkoma:no-old-account-alias into develop
Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/713
This commit is contained in:
commit
024ffadd80
|
@ -65,7 +65,7 @@ defmodule Pleroma.Web.WebFinger do
|
|||
end
|
||||
|
||||
defp gather_aliases(%User{} = user) do
|
||||
[user.ap_id | user.also_known_as]
|
||||
[user.ap_id]
|
||||
end
|
||||
|
||||
def represent_user(user, "JSON") do
|
||||
|
|
|
@ -46,8 +46,7 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
|
|||
assert response["subject"] == "acct:#{user.nickname}@localhost"
|
||||
|
||||
assert response["aliases"] == [
|
||||
"https://hyrule.world/users/zelda",
|
||||
"https://mushroom.kingdom/users/toad"
|
||||
"https://hyrule.world/users/zelda"
|
||||
]
|
||||
end
|
||||
|
||||
|
@ -104,7 +103,6 @@ defmodule Pleroma.Web.WebFinger.WebFingerControllerTest do
|
|||
|> response(200)
|
||||
|
||||
assert response =~ "<Alias>https://hyrule.world/users/zelda</Alias>"
|
||||
assert response =~ "<Alias>https://mushroom.kingdom/users/toad</Alias>"
|
||||
end
|
||||
|
||||
test "it returns 404 when user isn't found (XML)" do
|
||||
|
|
Loading…
Reference in a new issue