Merge branch 'import-maybe-direct-follow' into 'develop'
[akkoma] / lib / pleroma / web / twitter_api / controllers / util_controller.ex
index 886b70f5f2b24d892b350fd4f42a66f3d822348b..109704d00593c60bc586137f49cf80d7cc314b8f 100644 (file)
@@ -176,6 +176,7 @@ defmodule Pleroma.Web.TwitterAPI.UtilController do
           chatDisabled: !Keyword.get(@instance_chat, :enabled),
           showInstanceSpecificPanel: Keyword.get(@instance_fe, :show_instance_panel),
           scopeOptionsEnabled: Keyword.get(@instance_fe, :scope_options_enabled),
+          formattingOptionsEnabled: Keyword.get(@instance_fe, :formatting_options_enabled),
           collapseMessageWithSubject: Keyword.get(@instance_fe, :collapse_message_with_subject)
         }
 
@@ -222,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)}")