summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/users/notes.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2021-03-21 12:31:56 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2021-03-21 12:31:56 +0900
commitc52b50414094e2d44aaea3ab78ef17d04566db80 (patch)
tree30d1e38584d49c344041700413fee7afa449adca /src/server/api/endpoints/users/notes.ts
parentperf(server): Improve following/followers API performance (diff)
downloadsharkey-c52b50414094e2d44aaea3ab78ef17d04566db80.tar.gz
sharkey-c52b50414094e2d44aaea3ab78ef17d04566db80.tar.bz2
sharkey-c52b50414094e2d44aaea3ab78ef17d04566db80.zip
Revert "fix(server): Use inner join"
This reverts commit d7e7848c9206b68ab86d2d566ec4247db87827c0.
Diffstat (limited to 'src/server/api/endpoints/users/notes.ts')
-rw-r--r--src/server/api/endpoints/users/notes.ts10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/api/endpoints/users/notes.ts b/src/server/api/endpoints/users/notes.ts
index 98c9f10308..91d1d7f4dd 100644
--- a/src/server/api/endpoints/users/notes.ts
+++ b/src/server/api/endpoints/users/notes.ts
@@ -131,11 +131,11 @@ export default define(meta, async (ps, me) => {
//#region Construct query
const query = makePaginationQuery(Notes.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate)
.andWhere('note.userId = :userId', { userId: user.id })
- .innerJoinAndSelect('note.user', 'user')
- .innerJoinAndSelect('note.reply', 'reply')
- .innerJoinAndSelect('note.renote', 'renote')
- .innerJoinAndSelect('reply.user', 'replyUser')
- .innerJoinAndSelect('renote.user', 'renoteUser');
+ .leftJoinAndSelect('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, user);