don’t return an :ok in mark_sensitive
This commit is contained in:
parent
0c71e59152
commit
cca291ea78
1 changed files with 3 additions and 3 deletions
|
@ -856,7 +856,7 @@ index 000000000..f3894c8ae
|
||||||
+end
|
+end
|
||||||
diff --git a/lib/pleroma/web/activity_pub/mrf/require_image_description.ex b/lib/pleroma/web/activity_pub/mrf/require_image_description.ex
|
diff --git a/lib/pleroma/web/activity_pub/mrf/require_image_description.ex b/lib/pleroma/web/activity_pub/mrf/require_image_description.ex
|
||||||
new file mode 100644
|
new file mode 100644
|
||||||
index 000000000..ea7c1ee68
|
index 000000000..67390e613
|
||||||
--- /dev/null
|
--- /dev/null
|
||||||
+++ b/lib/pleroma/web/activity_pub/mrf/require_image_description.ex
|
+++ b/lib/pleroma/web/activity_pub/mrf/require_image_description.ex
|
||||||
@@ -0,0 +1,45 @@
|
@@ -0,0 +1,45 @@
|
||||||
|
@ -871,12 +871,12 @@ index 000000000..ea7c1ee68
|
||||||
+
|
+
|
||||||
+ def mark_sensitive(object) do
|
+ def mark_sensitive(object) do
|
||||||
+ object |> Map.put("sensitive", true)
|
+ object |> Map.put("sensitive", true)
|
||||||
+ {:ok, object}
|
+ object
|
||||||
+ end
|
+ end
|
||||||
+
|
+
|
||||||
+ def correct_attachment(object) do
|
+ def correct_attachment(object) do
|
||||||
+ if is_valid_attachment(object) do
|
+ if is_valid_attachment(object) do
|
||||||
+ {:ok, object}
|
+ object
|
||||||
+ else
|
+ else
|
||||||
+ mark_sensitive(object)
|
+ mark_sensitive(object)
|
||||||
+ end
|
+ end
|
||||||
|
|
Reference in a new issue