mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-18 07:48:19 +00:00
14 lines
377 B
Elixir
14 lines
377 B
Elixir
|
defmodule Pleroma.Web.Metadata.Providers.RelMe do
|
||
|
alias Pleroma.Web.Metadata.Providers.Provider
|
||
|
@behaviour Provider
|
||
|
|
||
|
@impl Provider
|
||
|
def build_tags(%{user: user}) do
|
||
|
(Floki.attribute(user.bio, "link[rel~=me]", "href") ++
|
||
|
Floki.attribute(user.bio, "a[rel~=me]", "href"))
|
||
|
|> Enum.map(fn link ->
|
||
|
{:link, [rel: "me", href: link], []}
|
||
|
end)
|
||
|
end
|
||
|
end
|