Add basic config endpoint.
[akkoma] / lib / pleroma / web / twitter_api / twitter_api_controller.ex
index c3a58b63a8dee40ea04e76ebb1bf329e9118f25a..3f299a941690e2a93d0e5013ecec9c53e9f90e8f 100644 (file)
@@ -83,6 +83,20 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
     |> send_resp(200, response)
   end
 
+  def config(conn, _params) do
+    response = %{
+      site: %{
+        name: Pleroma.Web.base_url,
+        server: Pleroma.Web.base_url,
+        textlimit: -1
+      }
+    }
+    |> Poison.encode!
+
+    conn
+    |> json_reply(200, response)
+  end
+
   defp json_reply(conn, status, json) do
     conn
     |> put_resp_content_type("application/json")