Disable providers of user and status metadata when instance is private

This commit is contained in:
Mark Felder 2020-08-31 14:35:22 -05:00 committed by rinpatch
commit ff07014b26
3 changed files with 22 additions and 2 deletions

View file

@ -22,4 +22,13 @@ defmodule Pleroma.Web.MetadataTest do
"<meta content=\"noindex, noarchive\" name=\"robots\">"
end
end
describe "no metadata for private instances" do
test "for local user" do
Pleroma.Config.put([:instance, :public], false)
user = insert(:user, bio: "This is my secret fedi account bio")
assert "" = Pleroma.Web.Metadata.build_tags(%{user: user})
end
end
end