mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-24 07:16:18 +00:00
ada384207b
docs for RelMe provider
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
|