feat: per user featured notes
This commit is contained in:
parent
adf9d9c969
commit
a5b6e807bb
11 changed files with 116 additions and 11 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue