user: add a workaround for situations where Pleroma may believe a followee is followed

this was caused by lack of Undo follows in the early days, and can likely be eventually removed
This commit is contained in:
William Pitcock 2018-05-28 16:42:18 +00:00
commit 1452b2823f
2 changed files with 9 additions and 1 deletions

View file

@ -197,6 +197,14 @@ defmodule Pleroma.User do
end
end
def maybe_follow(%User{} = follower, %User{info: info} = followed) do
if not following?(follower, followed) do
follow(follower, followed)
else
{:ok, follower}
end
end
def follow(%User{} = follower, %User{info: info} = followed) do
ap_followers = followed.follower_address