From 78939c1d161f09ac38348fc02e8f4a83d8d82d2d Mon Sep 17 00:00:00 2001 From: lain Date: Thu, 27 Aug 2020 12:13:18 +0200 Subject: ChatController: Don't die if the recipient is gone. --- lib/pleroma/web/pleroma_api/controllers/chat_controller.ex | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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() -- cgit v1.2.3