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.ex16
1 files changed, 15 insertions, 1 deletions
diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex
index 741689ebf..11e7b3bdf 100644
--- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex
+++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex
@@ -64,7 +64,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})
@@ -103,6 +103,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")