aboutsummaryrefslogtreecommitdiff
path: root/lib/pleroma/web/twitter_api/twitter_api_controller.ex
diff options
context:
space:
mode:
Diffstat (limited to 'lib/pleroma/web/twitter_api/twitter_api_controller.ex')
-rw-r--r--lib/pleroma/web/twitter_api/twitter_api_controller.ex18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex
index 8163897e7..766da6c93 100644
--- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex
+++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex
@@ -44,7 +44,7 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
end
def follow(%{assigns: %{user: user}} = conn, %{ "user_id" => followed_id }) do
- { :ok, _user, follower, _activity } = TwitterAPI.follow(user, followed_id)
+ { :ok, user, follower, _activity } = TwitterAPI.follow(user, followed_id)
response = follower |> UserRepresenter.to_json(%{for: user})
@@ -83,10 +83,24 @@ defmodule Pleroma.Web.TwitterAPI.Controller do
|> send_resp(200, response)
end
- def help_test(conn, _) do
+ def help_test(conn, _params) do
conn |> json_reply(200, Poison.encode!("ok"))
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")