User: Don't unfollow on block when the relevant setting is set.

This commit is contained in:
lain 2020-06-26 12:06:00 +02:00
commit 15a8b70318
4 changed files with 18 additions and 20 deletions

View file

@ -1309,7 +1309,8 @@ defmodule Pleroma.User do
unsubscribe(blocked, blocker)
if following?(blocked, blocker), do: unfollow(blocked, blocker)
unfollowing_blocked = Config.get([:activitypub, :unfollow_blocked], true)
if unfollowing_blocked && following?(blocked, blocker), do: unfollow(blocked, blocker)
{:ok, blocker} = update_follower_count(blocker)
{:ok, blocker, _} = Participation.mark_all_as_read(blocker, blocked)