Revert Rich Media censorship for sensitive statuses

The #NSFW hashtag test was broken anyway.
This commit is contained in:
Mark Felder 2020-09-28 18:22:59 -05:00
commit ba7f9459b4
2 changed files with 0 additions and 36 deletions

View file

@ -64,41 +64,6 @@ defmodule Pleroma.Web.RichMedia.HelpersTest do
Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
end
test "refuses to crawl URLs from posts marked sensitive" do
user = insert(:user)
{:ok, activity} =
CommonAPI.post(user, %{
status: "http://example.com/ogp",
sensitive: true
})
%Object{} = object = Object.normalize(activity)
assert object.data["sensitive"]
Config.put([:rich_media, :enabled], true)
assert %{} = Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
end
test "refuses to crawl URLs from posts tagged NSFW" do
user = insert(:user)
{:ok, activity} =
CommonAPI.post(user, %{
status: "http://example.com/ogp #nsfw"
})
%Object{} = object = Object.normalize(activity)
assert object.data["sensitive"]
Config.put([:rich_media, :enabled], true)
assert %{} = Pleroma.Web.RichMedia.Helpers.fetch_data_for_activity(activity)
end
test "refuses to crawl URLs of private network from posts" do
user = insert(:user)