Merge branch 'fix-stuck-follows' into 'develop'

User: Don't error out when following a user that's already followed.

See merge request pleroma/pleroma!1249
This commit is contained in:
rinpatch 2019-06-05 11:07:54 +00:00
commit 50afe5ab9e
4 changed files with 120 additions and 60 deletions

View file

@ -370,8 +370,8 @@ defmodule Pleroma.User do
ap_followers = followed.follower_address
cond do
following?(follower, followed) or info.deactivated ->
{:error, "Could not follow user: #{followed.nickname} is already on your list."}
info.deactivated ->
{:error, "Could not follow user: You are deactivated."}
deny_follow_blocked and blocks?(followed, follower) ->
{:error, "Could not follow user: #{followed.nickname} blocked you."}