projects
/
akkoma
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'fix/remove_auto_nsfw' into 'develop'
[akkoma]
/
lib
/
pleroma
/
web
/
activity_pub
/
mrf
/
simple_policy.ex
diff --git
a/lib/pleroma/web/activity_pub/mrf/simple_policy.ex
b/lib/pleroma/web/activity_pub/mrf/simple_policy.ex
index 0b1be8c517bcecc24d0e7cb105dc6966a686709c..62024c58c90929f9073ef72f00db9e2d0953ac5b 100644
(file)
--- a/
lib/pleroma/web/activity_pub/mrf/simple_policy.ex
+++ b/
lib/pleroma/web/activity_pub/mrf/simple_policy.ex
@@
-64,22
+64,16
@@
defmodule Pleroma.Web.ActivityPub.MRF.SimplePolicy do
%{host: actor_host} = _actor_info,
%{
"type" => "Create",
%{host: actor_host} = _actor_info,
%{
"type" => "Create",
- "object" => child_object
+ "object" =>
%{} = _
child_object
} = object
} = object
- )
- when is_map(child_object) do
+ ) do
media_nsfw =
Config.get([:mrf_simple, :media_nsfw])
|> MRF.subdomains_regex()
object =
if MRF.subdomain_match?(media_nsfw, actor_host) do
media_nsfw =
Config.get([:mrf_simple, :media_nsfw])
|> MRF.subdomains_regex()
object =
if MRF.subdomain_match?(media_nsfw, actor_host) do
- child_object =
- child_object
- |> Map.put("tag", (child_object["tag"] || []) ++ ["nsfw"])
- |> Map.put("sensitive", true)
-
- Map.put(object, "object", child_object)
+ Kernel.put_in(object, ["object", "sensitive"], true)
else
object
end
else
object
end