diff options
author | Alex Gleason <alex@alexgleason.me> | 2021-08-04 11:48:57 -0500 |
---|---|---|
committer | Alex Gleason <alex@alexgleason.me> | 2021-08-04 11:48:57 -0500 |
commit | 44ede0657f2da0a761de76b1f9822a293430d497 (patch) | |
tree | 387a8915bdb6ff1295f4f0872b2e6bc97e177831 /lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex | |
parent | 1f093cb216ed0d6b0d23b05e1ffbbf55dc72bbee (diff) | |
parent | d8a986c9e893de8eed3aa336a557695669b1ffee (diff) | |
download | pleroma-44ede0657f2da0a761de76b1f9822a293430d497.tar.gz |
Merge remote-tracking branch 'pleroma/develop' into staff-plug
Diffstat (limited to 'lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex')
-rw-r--r-- | lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex b/lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex index 6ca02fbd7..42d7601ed 100644 --- a/lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex @@ -11,8 +11,8 @@ defmodule Pleroma.Web.TwitterAPI.RemoteFollowController do alias Pleroma.MFA alias Pleroma.Object.Fetcher alias Pleroma.User - alias Pleroma.Web.Auth.Authenticator alias Pleroma.Web.Auth.TOTPAuthenticator + alias Pleroma.Web.Auth.WrapperAuthenticator alias Pleroma.Web.CommonAPI @status_types ["Article", "Event", "Note", "Video", "Page", "Question"] @@ -38,7 +38,7 @@ defmodule Pleroma.Web.TwitterAPI.RemoteFollowController do defp follow_status(conn, _user, acct) do with {:ok, object} <- Fetcher.fetch_object_from_id(acct), %Activity{id: activity_id} <- Activity.get_create_by_object_ap_id(object.data["id"]) do - redirect(conn, to: o_status_path(conn, :notice, activity_id)) + redirect(conn, to: Routes.o_status_path(conn, :notice, activity_id)) else error -> handle_follow_error(conn, error) @@ -88,7 +88,7 @@ defmodule Pleroma.Web.TwitterAPI.RemoteFollowController do # def do_follow(conn, %{"authorization" => %{"name" => _, "password" => _, "id" => id}}) do with {_, %User{} = followee} <- {:fetch_user, User.get_cached_by_id(id)}, - {_, {:ok, user}, _} <- {:auth, Authenticator.get_user(conn), followee}, + {_, {:ok, user}, _} <- {:auth, WrapperAuthenticator.get_user(conn), followee}, {_, _, _, false} <- {:mfa_required, followee, user, MFA.require?(user)}, {:ok, _, _, _} <- CommonAPI.follow(user, followee) do redirect(conn, to: "/users/#{followee.id}") |