From: dtluna Date: Fri, 21 Apr 2017 15:36:03 +0000 (+0300) Subject: Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into feature/follow... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=a9b3f99d48a430b4810662113e2118a68c49af4d;p=akkoma Merge branch 'develop' of ssh.gitgud.io:lambadalambda/pleroma into feature/follow-unfollow-by-screen-name --- a9b3f99d48a430b4810662113e2118a68c49af4d diff --cc lib/pleroma/web/twitter_api/twitter_api_controller.ex index 3d6487396,8ea54852d..4d21ce9d3 --- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@@ -57,8 -57,16 +57,16 @@@ defmodule Pleroma.Web.TwitterAPI.Contro end end + def mentions_timeline(%{assigns: %{user: user}} = conn, params) do + statuses = TwitterAPI.fetch_mentions(user, params) + {:ok, json} = Poison.encode(statuses) + + conn + |> json_reply(200, json) + end + - def follow(%{assigns: %{user: user}} = conn, %{ "user_id" => followed_id }) do - case TwitterAPI.follow(user, followed_id) do + def follow(%{assigns: %{user: user}} = conn, params) do + case TwitterAPI.follow(user, params) do { :ok, user, followed, _activity } -> response = followed |> UserRepresenter.to_json(%{for: user}) conn