Commit 551d80cc authored by lain's avatar lain

Expose restricted names in nodeinfo.

parent 91724d16
......@@ -138,7 +138,8 @@ def nodeinfo(conn, %{"version" => "2.0"}) do
accountActivationRequired: Keyword.get(instance, :account_activation_required, false),
invitesEnabled: Keyword.get(instance, :invites_enabled, false),
features: features
features: features,
restrictedNicknames: Pleroma.Config.get([Pleroma.User, :restricted_nicknames])
......@@ -19,6 +19,17 @@ test "nodeinfo shows staff accounts", %{conn: conn} do
assert user.ap_id in result["metadata"]["staffAccounts"]
test "nodeinfo shows restricted nicknames", %{conn: conn} do
conn =
|> get("/nodeinfo/2.0.json")
assert result = json_response(conn, 200)
assert Pleroma.Config.get([Pleroma.User, :restricted_nicknames]) ==
test "returns 404 when federation is disabled", %{conn: conn} do
instance =
Application.get_env(:pleroma, :instance)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment