Fix thread query
This commit is contained in:
parent
e43e6c3d0a
commit
e4f60695d8
1 changed files with 1 additions and 1 deletions
|
@ -353,7 +353,7 @@ pub async fn get_thread(
|
||||||
WITH RECURSIVE
|
WITH RECURSIVE
|
||||||
ancestors (id, in_reply_to_id) AS (
|
ancestors (id, in_reply_to_id) AS (
|
||||||
SELECT post.id, post.in_reply_to_id FROM post
|
SELECT post.id, post.in_reply_to_id FROM post
|
||||||
WHERE post.id = $1 AND {condition}
|
WHERE post.id = $1 AND ({condition})
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT post.id, post.in_reply_to_id FROM post
|
SELECT post.id, post.in_reply_to_id FROM post
|
||||||
JOIN ancestors ON post.id = ancestors.in_reply_to_id
|
JOIN ancestors ON post.id = ancestors.in_reply_to_id
|
||||||
|
|
Loading…
Reference in a new issue