From 4aa699271c4b818b924881deedf0a7f43409dfa1 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Sat, 23 Mar 2019 03:13:19 +0000 Subject: [PATCH] activity: use left join instead of inner join when fetching activities that may or may not have a child object --- lib/pleroma/activity.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/pleroma/activity.ex b/lib/pleroma/activity.ex index fcdac3a3f..26190df2f 100644 --- a/lib/pleroma/activity.ex +++ b/lib/pleroma/activity.ex @@ -83,7 +83,7 @@ defmodule Pleroma.Activity do from( activity in Activity, where: fragment("(?)->>'id' = ?", activity.data, ^to_string(ap_id)), - inner_join: o in Object, + left_join: o in Object, on: fragment( "(?->>'id') = COALESCE((? -> 'object'::text) ->> 'id'::text)",