aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-08-31 20:55:05 +0000
committerHaelwenn <contact+git.pleroma.social@hacktivis.me>2020-08-31 20:55:05 +0000
commit9d63b2c9db88ffdeb608df427caf2996eb0bb094 (patch)
tree35547f73c20bd504ff4465ee0402078ba48b34df /lib
parente0eb90f62a5c8cc14c8fd7fc82ab54342f6fe209 (diff)
parent0b621a834acf751332f4d202bd50d4ff3e789176 (diff)
downloadpleroma-9d63b2c9db88ffdeb608df427caf2996eb0bb094.tar.gz
Merge branch 'chat-relation-constraints' into 'develop'
Chats: Add cascading delete on both referenced users. See merge request pleroma/pleroma!2934
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/pleroma_api/controllers/chat_controller.ex4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
index 1f2e953f7..e8a1746d4 100644
--- a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
+++ b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
@@ -149,9 +149,7 @@ defmodule Pleroma.Web.PleromaAPI.ChatController do
from(c in Chat,
where: c.user_id == ^user_id,
where: c.recipient not in ^blocked_ap_ids,
- order_by: [desc: c.updated_at],
- inner_join: u in User,
- on: u.ap_id == c.recipient
+ order_by: [desc: c.updated_at]
)
|> Repo.all()