diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-06 18:30:08 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-10-06 18:30:08 +0900 |
| commit | a5b6e807bb6aaf3212f88b4ec4f96c285a80e390 (patch) | |
| tree | b33b8a2810d19eea0fba105c0686526821900bae /packages/backend/src/core/NoteCreateService.ts | |
| parent | 2023.10.0-beta.4 (diff) | |
| download | sharkey-a5b6e807bb6aaf3212f88b4ec4f96c285a80e390.tar.gz sharkey-a5b6e807bb6aaf3212f88b4ec4f96c285a80e390.tar.bz2 sharkey-a5b6e807bb6aaf3212f88b4ec4f96c285a80e390.zip | |
feat: per user featured notes
Diffstat (limited to 'packages/backend/src/core/NoteCreateService.ts')
| -rw-r--r-- | packages/backend/src/core/NoteCreateService.ts | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/backend/src/core/NoteCreateService.ts b/packages/backend/src/core/NoteCreateService.ts index 32f1af4528..b6fc4b3c49 100644 --- a/packages/backend/src/core/NoteCreateService.ts +++ b/packages/backend/src/core/NoteCreateService.ts @@ -729,9 +729,10 @@ export class NoteCreateService implements OnApplicationShutdown { // 30%の確率でハイライト用ランキング更新 if (Math.random() < 0.3) { if (renote.channelId != null) { - this.featuredService.updateInChannelNotesRanking(renote.id, renote.channelId, 1); + this.featuredService.updateInChannelNotesRanking(renote.channelId, renote.id, 5); } else if (renote.visibility === 'public' && renote.userHost == null) { - this.featuredService.updateGlobalNotesRanking(renote.id, 1); + this.featuredService.updateGlobalNotesRanking(renote.id, 5); + this.featuredService.updatePerUserNotesRanking(renote.userId, renote.id, 5); } } } |