Use maybe_direct_follow for follow imports
authorscarlett <nia@netbsd.org>
Wed, 17 Oct 2018 03:16:11 +0000 (04:16 +0100)
committerscarlett <nia@netbsd.org>
Wed, 17 Oct 2018 03:16:11 +0000 (04:16 +0100)
lib/pleroma/web/twitter_api/controllers/util_controller.ex

index 4aaf28869c7dc8333651e209c7fc3296d7dcc33c..109704d00593c60bc586137f49cf80d7cc314b8f 100644 (file)
@@ -223,7 +223,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
       |> Enum.map(fn account ->
         with %User{} = follower <- User.get_cached_by_ap_id(user.ap_id),
              %User{} = followed <- User.get_or_fetch(account),
-             {:ok, follower} <- User.follow(follower, followed) do
+             {:ok, follower} <- User.maybe_direct_follow(follower, followed) do
           ActivityPub.follow(follower, followed)
         else
           err -> Logger.debug("follow_import: following #{account} failed with #{inspect(err)}")