save correct inReplyToStatusId.
[akkoma] / lib / pleroma / web / router.ex
index ac9d97e0f558c9ed1a12c4d3e41119c85bc8e666..15f66b24f95ae2edf9abb7e786b384ba7856af59 100644 (file)
@@ -1,7 +1,7 @@
 defmodule Pleroma.Web.Router do
   use Pleroma.Web, :router
 
-  alias Pleroma.{Repo, User}
+  alias Pleroma.{Repo, User, Web.Router}
 
   def user_fetcher(username) do
     {:ok, Repo.get_by(User, %{nickname: username})}
@@ -10,13 +10,13 @@ defmodule Pleroma.Web.Router do
   pipeline :api do
     plug :accepts, ["json"]
     plug :fetch_session
-    plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Pleroma.Web.Router.user_fetcher/1, optional: true}
+    plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Router.user_fetcher/1, optional: true}
   end
 
   pipeline :authenticated_api do
     plug :accepts, ["json"]
     plug :fetch_session
-    plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Pleroma.Web.Router.user_fetcher/1}
+    plug Pleroma.Plugs.AuthenticationPlug, %{fetcher: &Router.user_fetcher/1}
   end
 
   pipeline :well_known do
@@ -31,12 +31,15 @@ defmodule Pleroma.Web.Router do
 
     get "/statuses/public_timeline", TwitterAPI.Controller, :public_timeline
     get "/statuses/public_and_external_timeline", TwitterAPI.Controller, :public_and_external_timeline
+    get "/statuses/networkpublic_timeline", TwitterAPI.Controller, :public_and_external_timeline
     get "/statuses/user_timeline", TwitterAPI.Controller, :user_timeline
 
     get "/statuses/show/:id", TwitterAPI.Controller, :fetch_status
     get "/statusnet/conversation/:id", TwitterAPI.Controller, :fetch_conversation
 
     post "/account/register", TwitterAPI.Controller, :register
+
+    get "/externalprofile/show", TwitterAPI.Controller, :external_profile
   end
 
   scope "/api", Pleroma.Web do