links ++ module.gather_webfinger_links(user)
end)
end
+
+ @doc """
+ Gathers nodeinfo protocol names supported by the federation module.
+ """
+ @callback gather_nodeinfo_protocol_names() :: list()
+
+ @spec gather_nodeinfo_protocol_names() :: list()
+ def gather_nodeinfo_protocol_names do
+ Config.get([:instance, :federation_publisher_modules])
+ |> Enum.reduce([], fn module, links ->
+ links ++ module.gather_nodeinfo_protocol_names()
+ end)
+ end
end
alias Pleroma.User
alias Pleroma.Web
alias Pleroma.Web.ActivityPub.MRF
+ alias Pleroma.Web.Federator.Publisher
plug(Pleroma.Web.FederatingPlug)
name: Pleroma.Application.name() |> String.downcase(),
version: Pleroma.Application.version()
},
- protocols: ["ostatus", "activitypub"],
+ protocols: Publisher.gather_nodeinfo_protocol_names(),
services: %{
inbound: [],
outbound: []