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

This leads to a few situations where it is impossible to follow a user.
This commit is contained in:
lain 2019-06-05 12:06:45 +02:00
commit 8b9a0dd4a7
4 changed files with 119 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 deactivatedt."}
deny_follow_blocked and blocks?(followed, follower) ->
{:error, "Could not follow user: #{followed.nickname} blocked you."}