aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2020-08-27 12:13:18 +0200
committerlain <lain@soykaf.club>2020-08-27 12:13:18 +0200
commit78939c1d161f09ac38348fc02e8f4a83d8d82d2d (patch)
treec7af479806020ebaf490e234886b99f0b20b4a88 /lib
parent22050f9ec0854bde430b060f7fea8d16c288720a (diff)
downloadpleroma-78939c1d161f09ac38348fc02e8f4a83d8d82d2d.tar.gz
ChatController: Don't die if the recipient is gone.
Diffstat (limited to 'lib')
-rw-r--r--lib/pleroma/web/pleroma_api/controllers/chat_controller.ex4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
index e8a1746d4..1f2e953f7 100644
--- a/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
+++ b/lib/pleroma/web/pleroma_api/controllers/chat_controller.ex
@@ -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()