From: William Pitcock Date: Sat, 23 Mar 2019 03:13:19 +0000 (+0000) Subject: activity: use left join instead of inner join when fetching activities that may or... X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=4aa699271c4b818b924881deedf0a7f43409dfa1;p=akkoma activity: use left join instead of inner join when fetching activities that may or may not have a child object --- 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)",