Apply suggestion to lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex
This commit is contained in:
parent
5b84156013
commit
c9a44ec4a6
|
@ -30,7 +30,7 @@ def follow(%{assigns: %{user: user}} = conn, %{"acct" => acct}) do
|
||||||
defp follow_status(conn, _user, acct) do
|
defp follow_status(conn, _user, acct) do
|
||||||
with {:ok, object} <- Fetcher.fetch_object_from_id(acct),
|
with {:ok, object} <- Fetcher.fetch_object_from_id(acct),
|
||||||
%Activity{id: activity_id} <- Activity.get_create_by_object_ap_id(object.data["id"]) do
|
%Activity{id: activity_id} <- Activity.get_create_by_object_ap_id(object.data["id"]) do
|
||||||
redirect(conn, to: "/notice/#{activity_id}")
|
redirect(conn, to: o_status_path(conn, :notice, activity_id))
|
||||||
else
|
else
|
||||||
error ->
|
error ->
|
||||||
handle_follow_error(conn, error)
|
handle_follow_error(conn, error)
|
||||||
|
|
Loading…
Reference in a new issue