summaryrefslogtreecommitdiff
path: root/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2021-03-02 19:54:30 +0000
committerlain <lain@soykaf.club>2021-03-02 19:54:30 +0000
commitb221d77a6da07c684bdbc63ddf4500e0d7ffeae8 (patch)
tree0015c7c3ea57f7340fbf80fd230a5f5e1c548148 /lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
parentc2186a62d54043ea9638d33f80c7576aba9783e8 (diff)
parent0a589c887bd4215e7d443a34c194fd0a3bde8f72 (diff)
Merge branch 'release/2.3.0' into 'stable'
Release/2.3.0 See merge request pleroma/pleroma!3354
Diffstat (limited to 'lib/pleroma/web/activity_pub/mrf/object_age_policy.ex')
-rw-r--r--lib/pleroma/web/activity_pub/mrf/object_age_policy.ex30
1 files changed, 29 insertions, 1 deletions
diff --git a/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex b/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
index d45d2d7e3..aac24c0ec 100644
--- a/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
+++ b/lib/pleroma/web/activity_pub/mrf/object_age_policy.ex
@@ -1,5 +1,5 @@
# Pleroma: A lightweight social networking server
-# Copyright © 2017-2020 Pleroma Authors <https://pleroma.social/>
+# Copyright © 2017-2021 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only
defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy do
@@ -106,4 +106,32 @@ defmodule Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy do
{:ok, %{mrf_object_age: mrf_object_age}}
end
+
+ @impl true
+ def config_description do
+ %{
+ key: :mrf_object_age,
+ related_policy: "Pleroma.Web.ActivityPub.MRF.ObjectAgePolicy",
+ label: "MRF Object Age",
+ description:
+ "Rejects or delists posts based on their timestamp deviance from your server's clock.",
+ children: [
+ %{
+ key: :threshold,
+ type: :integer,
+ description: "Required age (in seconds) of a post before actions are taken.",
+ suggestions: [172_800]
+ },
+ %{
+ key: :actions,
+ type: {:list, :atom},
+ description:
+ "A list of actions to apply to the post. `:delist` removes the post from public timelines; " <>
+ "`:strip_followers` removes followers from the ActivityPub recipient list ensuring they won't be delivered to home timelines; " <>
+ "`:reject` rejects the message entirely",
+ suggestions: [:delist, :strip_followers, :reject]
+ }
+ ]
+ }
+ end
end