Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into bugfix/repeated...
authordtluna <dtluna@openmailbox.org>
Thu, 13 Apr 2017 12:36:00 +0000 (15:36 +0300)
committerdtluna <dtluna@openmailbox.org>
Thu, 13 Apr 2017 12:36:00 +0000 (15:36 +0300)
1  2 
lib/pleroma/web/twitter_api/twitter_api.ex
lib/pleroma/web/twitter_api/twitter_api_controller.ex
test/web/twitter_api/twitter_api_test.exs

index f6574b8de7284ad5f362188a9cdc2f14b891273a,3f299a941690e2a93d0e5013ecec9c53e9f90e8f..13de1661dc9306a2fc5ae0353362f3362136354e
@@@ -44,13 -44,12 +44,13 @@@ defmodule Pleroma.Web.TwitterAPI.Contro
    end
  
    def follow(%{assigns: %{user: user}} = conn, %{ "user_id" => followed_id }) do
 -    { :ok, user, follower, _activity } = TwitterAPI.follow(user, followed_id)
 -
 -    response = follower |> UserRepresenter.to_json(%{for: user})
 -
 -    conn
 -    |> json_reply(200, response)
 +    case TwitterAPI.follow(user, followed_id) do
-       { :ok, _user, followed, _activity } ->
++      { :ok, user, followed, _activity } ->
 +        response = followed |> UserRepresenter.to_json(%{for: user})
-         conn |> json_reply(200, response)
++        conn
++        |> json_reply(200, response)
 +      { :error, msg } -> forbidden_json_reply(conn, msg)
 +    end
    end
  
    def unfollow(%{assigns: %{user: user}} = conn, %{ "user_id" => followed_id }) do