aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-05-12 13:23:09 +0200
committerlain <lain@soykaf.club>2020-05-12 13:23:09 +0200
commitec72cba43ec4f45faadf1b06a6d014cd4136707e (patch)
tree291b918ffe881c15b981d02a4805b348d3706249 /lib
parentdcb5cda324c5a8233c100e49d0ad137a5daffd71 (diff)
downloadpleroma-ec72cba43ec4f45faadf1b06a6d014cd4136707e.tar.gz
Chat Controller: Add basic error handling.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/pleroma_api/controllers/chat_controller.ex5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
index 8eed88752..4ce3e7419 100644
--- a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
+++ b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
@@ -18,8 +18,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
import Ecto.Query
import Pleroma.Web.ActivityPub.ObjectValidator, only: [stringify_keys: 1]
- # TODO
- # - Error handling
+ action_fallback(Pleroma.Web.MastodonAPI.FallbackController)
plug(
OAuthScopesPlug,
@@ -53,6 +52,8 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
conn
|> put_view(ChatMessageView)
|> render("show.json", for: user, object: message, chat: chat)
+ else
+ _e -> {:error, :could_not_delete}
end
end