mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-12-30 20:27:22 +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
|