diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-07 07:53:14 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-07 07:53:14 +0900 |
| commit | 4a595153dc3a82206c5ee1c05a12deab663ba544 (patch) | |
| tree | 3316b942b3a0e3694cc71ce5bee8870709ffaf00 /packages/backend/src/core/ReactionService.ts | |
| parent | 2023.10.0-beta.5 (diff) | |
| download | sharkey-4a595153dc3a82206c5ee1c05a12deab663ba544.tar.gz sharkey-4a595153dc3a82206c5ee1c05a12deab663ba544.tar.bz2 sharkey-4a595153dc3a82206c5ee1c05a12deab663ba544.zip | |
enhance(backend): 返信はハイライトに載らないように
Diffstat (limited to 'packages/backend/src/core/ReactionService.ts')
| -rw-r--r-- | packages/backend/src/core/ReactionService.ts | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/packages/backend/src/core/ReactionService.ts b/packages/backend/src/core/ReactionService.ts index 63cf4be322..86213e4576 100644 --- a/packages/backend/src/core/ReactionService.ts +++ b/packages/backend/src/core/ReactionService.ts @@ -195,10 +195,14 @@ export class ReactionService { // 30%の確率でハイライト用ランキング更新 if (Math.random() < 0.3 && note.userId !== user.id) { if (note.channelId != null) { - this.featuredService.updateInChannelNotesRanking(note.channelId, note.id, 1); - } else if (note.visibility === 'public' && note.userHost == null) { - this.featuredService.updateGlobalNotesRanking(note.id, 1); - this.featuredService.updatePerUserNotesRanking(note.userId, note.id, 1); + if (note.replyId == null) { + this.featuredService.updateInChannelNotesRanking(note.channelId, note.id, 1); + } + } else { + if (note.visibility === 'public' && note.userHost == null && note.replyId == null) { + this.featuredService.updateGlobalNotesRanking(note.id, 1); + this.featuredService.updatePerUserNotesRanking(note.userId, note.id, 1); + } } } |