diff options
author | lain <lain@soykaf.club> | 2020-05-05 16:42:34 +0200 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-05-05 16:42:34 +0200 |
commit | a3bb2e5474ee068bf375b24df8906e51654c9699 (patch) | |
tree | 2e155d1608ea4ef8059d5a204b45d5f361c9e940 /lib/pleroma/web/mastodon_api/controllers/status_controller.ex | |
parent | b34debe61540cf845ccf4ac93066e45a1d9c8f85 (diff) |
Undoing: Move undoing announcements to the pipeline everywhere.
Diffstat (limited to 'lib/pleroma/web/mastodon_api/controllers/status_controller.ex')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/status_controller.ex | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex index 2a5eac9d9..12e3ba15e 100644 --- a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex @@ -206,9 +206,9 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do end @doc "POST /api/v1/statuses/:id/unreblog" - def unreblog(%{assigns: %{user: user}} = conn, %{"id" => ap_id_or_id}) do - with {:ok, _unannounce, %{data: %{"id" => id}}} <- CommonAPI.unrepeat(ap_id_or_id, user), - %Activity{} = activity <- Activity.get_create_by_object_ap_id_with_object(id) do + def unreblog(%{assigns: %{user: user}} = conn, %{"id" => activity_id}) do + with {:ok, _unannounce} <- CommonAPI.unrepeat(activity_id, user), + %Activity{} = activity <- Activity.get_by_id(activity_id) do try_render(conn, "show.json", %{activity: activity, for: user, as: :activity}) end end |