From 22bbe271154731902f94ce9a8b035cb18c58e437 Mon Sep 17 00:00:00 2001 From: eal Date: Tue, 14 Nov 2017 16:10:13 +0200 Subject: [PATCH] TwitterAPI: Add unimplemented /friendships/no_retweets/ids. --- lib/pleroma/web/router.ex | 1 + lib/pleroma/web/twitter_api/twitter_api_controller.ex | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 7a5c78867..1fb8cb51a 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -190,6 +190,7 @@ defmodule Pleroma.Web.Router do get "/statuses/followers", TwitterAPI.Controller, :followers get "/statuses/friends", TwitterAPI.Controller, :friends get "/friends/ids", TwitterAPI.Controller, :friends_ids + get "/friendships/no_retweets/ids", TwitterAPI.Controller, :empty_array get "/externalprofile/show", TwitterAPI.Controller, :external_profile end diff --git a/lib/pleroma/web/twitter_api/twitter_api_controller.ex b/lib/pleroma/web/twitter_api/twitter_api_controller.ex index 887474a23..9ea0773c9 100644 --- a/lib/pleroma/web/twitter_api/twitter_api_controller.ex +++ b/lib/pleroma/web/twitter_api/twitter_api_controller.ex @@ -270,12 +270,16 @@ defmodule Pleroma.Web.TwitterAPI.Controller do ids = friends |> Enum.map(fn x -> x.id end) |> Poison.encode! + json(conn, ids) else _e -> bad_request_reply(conn, "Can't get friends") end end + def empty_array(conn, _params) do + json(conn, Poison.encode!([])) + end def update_profile(%{assigns: %{user: user}} = conn, params) do params = if bio = params["description"] do -- 2.45.2