diff options
author | lain <lain@soykaf.club> | 2020-07-09 09:37:52 +0000 |
---|---|---|
committer | lain <lain@soykaf.club> | 2020-07-09 09:37:52 +0000 |
commit | 6d688f14fa0e1f15893e39bcbff2ba0aac4b085c (patch) | |
tree | e0ddb9a819231c3f5d3a8ab59a0c516de709e095 /lib | |
parent | 8be0c04b403c82a72deaf2147589c4a5c603edc5 (diff) | |
parent | fc1f34b85125b24a8094aaa963acb46acacd8eee (diff) | |
download | pleroma-6d688f14fa0e1f15893e39bcbff2ba0aac4b085c.tar.gz pleroma-6d688f14fa0e1f15893e39bcbff2ba0aac4b085c.zip |
Merge branch 'bugfix/status-deletion' into 'develop'
#1920 fix activity deletion
See merge request pleroma/pleroma!2721
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pleroma/web/mastodon_api/controllers/status_controller.ex | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex index 3f4c53437..12be530c9 100644 --- a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex @@ -201,15 +201,13 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do @doc "DELETE /api/v1/statuses/:id" def delete(%{assigns: %{user: user}} = conn, %{id: id}) do with %Activity{} = activity <- Activity.get_by_id_with_object(id), - render <- - try_render(conn, "show.json", - activity: activity, - for: user, - with_direct_conversation_id: true, - with_source: true - ), {:ok, %Activity{}} <- CommonAPI.delete(id, user) do - render + try_render(conn, "show.json", + activity: activity, + for: user, + with_direct_conversation_id: true, + with_source: true + ) else _e -> {:error, :not_found} end |