features: features,
restrictedNicknames: Config.get([Pleroma.User, :restricted_nicknames]),
skipThreadContainment: Config.get([:instance, :skip_thread_containment], false),
- privilegedStaff: Config.get([:instance, :privileged_staff])
+ privilegedStaff: Config.get([:instance, :privileged_staff]),
+ localBubbleInstances: Config.get([:instance, :local_bubble], [])
}
}
end
mailerEnabled: Config.get([Pleroma.Emails.Mailer, :enabled], false),
features: features,
restrictedNicknames: Config.get([Pleroma.User, :restricted_nicknames]),
- skipThreadContainment: Config.get([:instance, :skip_thread_containment], false)
+ skipThreadContainment: Config.get([:instance, :skip_thread_containment], false),
+ localBubbleInstances: Config.get([:instance, :local_bubble], [])
}
}
end
end
end
+ test "Bubble instances", %{conn: conn} do
+ clear_config([:instance, :local_bubble], [])
+
+ response =
+ conn
+ |> get("/nodeinfo/2.1.json")
+ |> json_response(:ok)
+
+ assert response["metadata"]["localBubbleInstances"] == []
+ clear_config([:instance, :local_bubble], ["example.com"])
+
+ response =
+ conn
+ |> get("/nodeinfo/2.1.json")
+ |> json_response(:ok)
+
+ assert response["metadata"]["localBubbleInstances"] == ["example.com"]
+ end
+
describe "MRF SimplePolicy" do
setup do
clear_config([:mrf, :policies], [Pleroma.Web.ActivityPub.MRF.SimplePolicy])