From: eal Date: Fri, 9 Mar 2018 18:56:21 +0000 (+0200) Subject: MastoAPI: Add unimplemented status card endpoint. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=18e1202a3bc9b405b2c35fcde7a6fa69fd47a888;p=akkoma MastoAPI: Add unimplemented status card endpoint. --- diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex index 0d84308e7..c03941254 100644 --- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex +++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex @@ -624,6 +624,11 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do json(conn, []) end + def empty_object(conn, _) do + Logger.debug("Unimplemented, returning an empty object") + json(conn, %{}) + end + def render_notification(user, %{id: id, activity: activity, inserted_at: created_at} = _params) do actor = User.get_cached_by_ap_id(activity.data["actor"]) created_at = NaiveDateTime.to_iso8601(created_at) diff --git a/lib/pleroma/web/router.ex b/lib/pleroma/web/router.ex index 520ac4a8c..3e9a8ba7b 100644 --- a/lib/pleroma/web/router.ex +++ b/lib/pleroma/web/router.ex @@ -132,6 +132,7 @@ defmodule Pleroma.Web.Router do get "/statuses/:id", MastodonAPIController, :get_status get "/statuses/:id/context", MastodonAPIController, :get_context + get "/statuses/:id/card", MastodonAPIController, :empty_object get "/statuses/:id/favourited_by", MastodonAPIController, :favourited_by get "/statuses/:id/reblogged_by", MastodonAPIController, :reblogged_by