Chats: Add cascading delete on both referenced users.
Also remove the now-superfluous join in the chat controller, which was only used to filter out these cases.
This commit is contained in:
parent
0417b2f649
commit
0b621a834a
3 changed files with 45 additions and 3 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue