Merge branch 'chat-relation-constraints' into 'develop'
Chats: Add cascading delete on both referenced users. See merge request pleroma/pleroma!2934
This commit is contained in:
commit
9d63b2c9db
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