Merge branch 'develop' of git.pleroma.social:pleroma/pleroma into feature/digest...
[akkoma] / lib / pleroma / web / metadata / rel_me.ex
1 defmodule Pleroma.Web.Metadata.Providers.RelMe do
2 alias Pleroma.Web.Metadata.Providers.Provider
3 @behaviour Provider
4
5 @impl Provider
6 def build_tags(%{user: user}) do
7 (Floki.attribute(user.bio, "link[rel~=me]", "href") ++
8 Floki.attribute(user.bio, "a[rel~=me]", "href"))
9 |> Enum.map(fn link ->
10 {:link, [rel: "me", href: link], []}
11 end)
12 end
13 end