From: squidboi Date: Sat, 9 Jun 2018 04:28:11 +0000 (+0000) Subject: formatting X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=4f9ecfc77a54eef23741c89206b4cbce924f7d76;p=akkoma formatting --- diff --git a/config/config.exs b/config/config.exs index 58b17e206..b8dd867c4 100644 --- a/config/config.exs +++ b/config/config.exs @@ -62,8 +62,7 @@ config :pleroma, :activitypub, unfollow_blocked: true, outgoing_blocks: true -config :pleroma, :user, - deny_follow_blocked: true +config :pleroma, :user, deny_follow_blocked: true config :pleroma, :mrf_simple, media_removal: [], diff --git a/lib/pleroma/user.ex b/lib/pleroma/user.ex index 5e3096172..dd645b2e5 100644 --- a/lib/pleroma/user.ex +++ b/lib/pleroma/user.ex @@ -181,7 +181,8 @@ defmodule Pleroma.User do false # if the users are blocking each other, we shouldn't even be here, but check for it anyway - @deny_follow_blocked and (User.blocks?(follower, followed) or User.blocks?(followed, follower)) -> + @deny_follow_blocked and + (User.blocks?(follower, followed) or User.blocks?(followed, follower)) -> false # if OStatus, then there is no three-way handshake to follow diff --git a/lib/pleroma/web/activity_pub/activity_pub.ex b/lib/pleroma/web/activity_pub/activity_pub.ex index f213b68ca..a12bd5b58 100644 --- a/lib/pleroma/web/activity_pub/activity_pub.ex +++ b/lib/pleroma/web/activity_pub/activity_pub.ex @@ -245,9 +245,9 @@ defmodule Pleroma.Web.ActivityPub.ActivityPub do @outgoing_blocks Keyword.get(@ap_config, :outgoing_blocks) def block(blocker, blocked, activity_id \\ nil, local \\ true) do - with true <- @unfollow_blocked do follow_activity = fetch_latest_follow(blocker, blocked) + if follow_activity do unfollow(blocker, blocked, nil, local) end