From a5b6e807bb6aaf3212f88b4ec4f96c285a80e390 Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 6 Oct 2023 18:30:08 +0900 Subject: feat: per user featured notes --- packages/backend/src/core/NoteCreateService.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'packages/backend/src/core/NoteCreateService.ts') 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); } } } -- cgit v1.2.3-freya