mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2025-01-25 15:09:34 +00:00
activity: use left join instead of inner join when fetching activities that may or may not have a child object
This commit is contained in:
parent
332dc1371b
commit
4aa699271c
1 changed files with 1 additions and 1 deletions
|
@ -83,7 +83,7 @@ defmodule Pleroma.Activity do
|
||||||
from(
|
from(
|
||||||
activity in Activity,
|
activity in Activity,
|
||||||
where: fragment("(?)->>'id' = ?", activity.data, ^to_string(ap_id)),
|
where: fragment("(?)->>'id' = ?", activity.data, ^to_string(ap_id)),
|
||||||
inner_join: o in Object,
|
left_join: o in Object,
|
||||||
on:
|
on:
|
||||||
fragment(
|
fragment(
|
||||||
"(?->>'id') = COALESCE((? -> 'object'::text) ->> 'id'::text)",
|
"(?->>'id') = COALESCE((? -> 'object'::text) ->> 'id'::text)",
|
||||||
|
|
Loading…
Add table
Reference in a new issue