logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma
commit: 984d7be1a4b4d1e1024a9f5d5aaee6252c553279
parent: b0fad153e1d4bf6c95c18bdab92a42978b729108
Author: kaniini <ariadne@dereferenced.org>
Date:   Tue, 13 Aug 2019 02:45:47 +0000

Merge branch 'feature/remove-disable-blocks' into 'develop'

config: remove legacy activitypub accept_blocks setting

See merge request pleroma/pleroma!1556

Diffstat:

MCHANGELOG.md1+
Mconfig/config.exs1-
Mdocs/config.md1-
Mlib/pleroma/web/activity_pub/transmogrifier.ex6++----
4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md @@ -88,6 +88,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Removed - Emoji: Remove longfox emojis. - Remove `Reply-To` header from report emails for admins. +- ActivityPub: The `accept_blocks` configuration setting. ## [1.0.1] - 2019-07-14 ### Security diff --git a/config/config.exs b/config/config.exs @@ -302,7 +302,6 @@ config :pleroma, :assets, default_mascot: :pleroma_fox_tan config :pleroma, :activitypub, - accept_blocks: true, unfollow_blocked: true, outgoing_blocks: true, follow_handshake_timeout: 500, diff --git a/docs/config.md b/docs/config.md @@ -329,7 +329,6 @@ config :pleroma, Pleroma.Web.Endpoint, This will make Pleroma listen on `127.0.0.1` port `8080` and generate urls starting with `https://example.com:2020` ## :activitypub -* ``accept_blocks``: Whether to accept incoming block activities from other instances * ``unfollow_blocked``: Whether blocks result in people getting unfollowed * ``outgoing_blocks``: Whether to federate blocks to other instances * ``deny_follow_blocked``: Whether to disallow following an account that has blocked the user in question diff --git a/lib/pleroma/web/activity_pub/transmogrifier.ex b/lib/pleroma/web/activity_pub/transmogrifier.ex @@ -701,8 +701,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do } = _data, _options ) do - with true <- Pleroma.Config.get([:activitypub, :accept_blocks]), - %User{local: true} = blocked <- User.get_cached_by_ap_id(blocked), + with %User{local: true} = blocked <- User.get_cached_by_ap_id(blocked), {:ok, %User{} = blocker} <- User.get_or_fetch_by_ap_id(blocker), {:ok, activity} <- ActivityPub.unblock(blocker, blocked, id, false) do User.unblock(blocker, blocked) @@ -716,8 +715,7 @@ defmodule Pleroma.Web.ActivityPub.Transmogrifier do %{"type" => "Block", "object" => blocked, "actor" => blocker, "id" => id} = _data, _options ) do - with true <- Pleroma.Config.get([:activitypub, :accept_blocks]), - %User{local: true} = blocked = User.get_cached_by_ap_id(blocked), + with %User{local: true} = blocked = User.get_cached_by_ap_id(blocked), {:ok, %User{} = blocker} = User.get_or_fetch_by_ap_id(blocker), {:ok, activity} <- ActivityPub.block(blocker, blocked, id, false) do User.unfollow(blocker, blocked)