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 1927d2021..20efa82bf 100644 --- a/lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex +++ b/lib/pleroma/web/twitter_api/controllers/remote_follow_controller.ex @@ -29,9 +29,16 @@ defmodule Pleroma.Web.TwitterAPI.RemoteFollowController do # GET /ostatus_subscribe # def follow(%{assigns: %{user: user}} = conn, %{"acct" => acct}) do - case is_status?(acct) do - true -> follow_status(conn, user, acct) - _ -> follow_account(conn, user, acct) + cond do + String.starts_with?(acct, "@") -> + follow_account(conn, user, String.slice(acct, 1..-1//1)) + + String.starts_with?(acct, "http://") || + (String.starts_with?(acct, "https://") && is_status?(acct)) -> + follow_status(conn, user, acct) + + true -> + follow_account(conn, user, acct) end end