aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRoger Braun <roger@rogerbraun.net>2017-11-13 09:48:56 +0100
committerRoger Braun <roger@rogerbraun.net>2017-11-13 09:48:56 +0100
commit083cd169d21b0f20332eac80b4481adb41810a64 (patch)
tree5046ff4c441ac22d2a389110376ec6c2dfefc045 /lib
parent5fc6e9d467f69af155627cccaa27616fe7ffc61f (diff)
downloadpleroma-083cd169d21b0f20332eac80b4481adb41810a64.tar.gz
MastoAPI: Fix repeat api bug.
Documentation was wrong, reblogging actually returns the reblog, not the reblogged status.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/mastodon_api/mastodon_api_controller.ex5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
index 41fbe55e7..c15c47fa1 100644
--- a/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
+++ b/lib/pleroma/web/mastodon_api/mastodon_api_controller.ex
@@ -223,9 +223,8 @@ defmodule Pleroma.Web.MastodonAPI.MastodonAPIController do
end
def reblog_status(%{assigns: %{user: user}} = conn, %{"id" => ap_id_or_id}) do
- with {:ok, _announce, %{data: %{"id" => id}}} = CommonAPI.repeat(ap_id_or_id, user),
- %Activity{} = activity <- Activity.get_create_activity_by_object_ap_id(id) do
- render conn, StatusView, "status.json", %{activity: activity, for: user, as: :activity}
+ with {:ok, announce, _activity} = CommonAPI.repeat(ap_id_or_id, user) do
+ render conn, StatusView, "status.json", %{activity: announce, for: user, as: :activity}
end
end