summaryrefslogtreecommitdiff
path: root/packages/backend/src/core/NoteCreateService.ts
diff options
context:
space:
mode:
authorsyuilo <Syuilotan@yahoo.co.jp>2023-10-06 18:30:08 +0900
committersyuilo <Syuilotan@yahoo.co.jp>2023-10-06 18:30:08 +0900
commita5b6e807bb6aaf3212f88b4ec4f96c285a80e390 (patch)
treeb33b8a2810d19eea0fba105c0686526821900bae /packages/backend/src/core/NoteCreateService.ts
parent2023.10.0-beta.4 (diff)
downloadsharkey-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.ts5
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);
}
}
}