Don't follow deactivated users.

This commit is contained in:
Lain Iwakura 2017-12-07 17:51:55 +01:00
commit a78ae2a685
2 changed files with 9 additions and 2 deletions

View file

@ -142,9 +142,9 @@ defmodule Pleroma.User do
end
end
def follow(%User{} = follower, %User{} = followed) do
def follow(%User{} = follower, %User{info: info} = followed) do
ap_followers = followed.follower_address
if following?(follower, followed) do
if following?(follower, followed) or info["deactivated"] do
{:error,
"Could not follow user: #{followed.nickname} is already on your list."}
else