X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fweb_finger.ex;h=a109e1accfcaa0287c169f4b367d10451197e50f;hb=5453038ce92597fe2d26cb843d48e9aa660d1ee9;hp=2de945ae514b42d3c0dd0fad80fb1234eaeba3ea;hpb=83770b7b391fdf8bdc22f63047b1cf444a7b16ce;p=akkoma diff --git a/lib/pleroma/web/web_finger.ex b/lib/pleroma/web/web_finger.ex index 2de945ae5..a109e1acc 100644 --- a/lib/pleroma/web/web_finger.ex +++ b/lib/pleroma/web/web_finger.ex @@ -59,7 +59,7 @@ defmodule Pleroma.Web.WebFinger do end defp gather_aliases(%User{} = user) do - [user.ap_id] ++ user.also_known_as + [user.ap_id | user.also_known_as] end def represent_user(user, "JSON") do @@ -76,8 +76,9 @@ defmodule Pleroma.Web.WebFinger do {:ok, user} = User.ensure_keys_present(user) aliases = - gather_aliases(user) - |> Enum.map(fn the_alias -> {:Alias, the_alias} end) + user + |> gather_aliases() + |> Enum.map(&{:Alias, &1}) links = gather_links(user) @@ -123,6 +124,9 @@ defmodule Pleroma.Web.WebFinger do {"application/ld+json; profile=\"https://www.w3.org/ns/activitystreams\"", "self"} -> Map.put(data, "ap_id", link["href"]) + {nil, "http://ostatus.org/schema/1.0/subscribe"} -> + Map.put(data, "subscribe_address", link["template"]) + _ -> Logger.debug("Unhandled type: #{inspect(link["type"])}") data