ChatController: Don't die if the recipient is gone.

This commit is contained in:
lain 2020-08-27 12:13:18 +02:00
commit 78939c1d16
2 changed files with 18 additions and 1 deletions

View file

@ -149,7 +149,9 @@ 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]
order_by: [desc: c.updated_at],
inner_join: u in User,
on: u.ap_id == c.recipient
)
|> Repo.all()