X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=lib%2Fpleroma%2Fweb%2Fmastodon_api%2Fcontrollers%2Fstatus_controller.ex;h=5c90065f6f9298dbb207cab596786d65175baae7;hb=421e35b578b3fc109f820f693e91139a3e3f8970;hp=287d1631cc9274313c40ba6d076273765983e1b6;hpb=5ebffd5224729413e53a55ddda9a1f86224d7d73;p=akkoma diff --git a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex index 287d1631c..5c90065f6 100644 --- a/lib/pleroma/web/mastodon_api/controllers/status_controller.ex +++ b/lib/pleroma/web/mastodon_api/controllers/status_controller.ex @@ -1,5 +1,5 @@ # Pleroma: A lightweight social networking server -# Copyright © 2017-2019 Pleroma Authors +# Copyright © 2017-2020 Pleroma Authors # SPDX-License-Identifier: AGPL-3.0-only defmodule Pleroma.Web.MastodonAPI.StatusController do @@ -175,6 +175,8 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do for: user, with_direct_conversation_id: true ) + else + _ -> {:error, :not_found} end end @@ -183,6 +185,7 @@ defmodule Pleroma.Web.MastodonAPI.StatusController do with {:ok, %Activity{}} <- CommonAPI.delete(id, user) do json(conn, %{}) else + {:error, :not_found} = e -> e _e -> render_error(conn, :forbidden, "Can't delete this post") end end