summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/notes/search.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/api/endpoints/notes/search.ts')
-rw-r--r--src/server/api/endpoints/notes/search.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/server/api/endpoints/notes/search.ts b/src/server/api/endpoints/notes/search.ts
index 1aca056299..230d2b0294 100644
--- a/src/server/api/endpoints/notes/search.ts
+++ b/src/server/api/endpoints/notes/search.ts
@@ -79,7 +79,11 @@ export default define(meta, async (ps, me) => {
query
.andWhere('note.text ILIKE :q', { q: `%${ps.query}%` })
- .leftJoinAndSelect('note.user', 'user');
+ .innerJoinAndSelect('note.user', 'user')
+ .leftJoinAndSelect('note.reply', 'reply')
+ .leftJoinAndSelect('note.renote', 'renote')
+ .leftJoinAndSelect('reply.user', 'replyUser')
+ .leftJoinAndSelect('renote.user', 'renoteUser');
generateVisibilityQuery(query, me);
if (me) generateMutedUserQuery(query, me);