diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts index 25132977f28e72b67b72bf17ccee148b765976f8..316367f23a134a9d8c45b8e0eb69f729ee4c2fd3 100644 --- a/packages/backend/src/core/entities/NoteEntityService.ts +++ b/packages/backend/src/core/entities/NoteEntityService.ts @@ -180,8 +180,8 @@ export class NoteEntityService implements OnModuleInit { // 実装上抜ã‘ãŒã‚ã‚‹ã ã‘ã‹ã‚‚ã—ã‚Œãªã„ã®ã§ã€ã€Œãƒ’ントã«å«ã¾ã‚Œã¦ãªã‹ã£ãŸã‚‰(=undefinedãªã‚‰)returnã€ã®ã‚ˆã†ã«ã¯ã—ãªã„ } - // パフォーマンスã®ãŸã‚ノートãŒä½œæˆã•ã‚Œã¦ã‹ã‚‰1秒以上経ã£ã¦ã„ãªã„å ´åˆã¯ãƒªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ãªã„ - if (note.createdAt.getTime() + 1000 > Date.now()) { + // パフォーマンスã®ãŸã‚ノートãŒä½œæˆã•ã‚Œã¦ã‹ã‚‰2秒以上経ã£ã¦ã„ãªã„å ´åˆã¯ãƒªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ãªã„ + if (note.createdAt.getTime() + 2000 > Date.now()) { return undefined; } @@ -382,8 +382,8 @@ export class NoteEntityService implements OnModuleInit { const myReactionsMap = new Map<MiNote['id'], MiNoteReaction | null>(); if (meId) { const renoteIds = notes.filter(n => n.renoteId != null).map(n => n.renoteId!); - // パフォーマンスã®ãŸã‚ノートãŒä½œæˆã•ã‚Œã¦ã‹ã‚‰1秒以上経ã£ã¦ã„ãªã„å ´åˆã¯ãƒªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ãªã„ - const targets = [...notes.filter(n => n.createdAt.getTime() + 1000 < Date.now()).map(n => n.id), ...renoteIds]; + // パフォーマンスã®ãŸã‚ノートãŒä½œæˆã•ã‚Œã¦ã‹ã‚‰2秒以上経ã£ã¦ã„ãªã„å ´åˆã¯ãƒªã‚¢ã‚¯ã‚·ãƒ§ãƒ³ã‚’å–å¾—ã—ãªã„ + const targets = [...notes.filter(n => n.createdAt.getTime() + 2000 < Date.now()).map(n => n.id), ...renoteIds]; const myReactions = await this.noteReactionsRepository.findBy({ userId: meId, noteId: In(targets),