enhance(backend): 3日以内に投稿されたノートのみハイライト用スコア加算
This commit is contained in:
parent
4a595153dc
commit
3a7558f36c
2 changed files with 8 additions and 4 deletions
|
@ -726,8 +726,8 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
.where('id = :id', { id: renote.id })
|
||||
.execute();
|
||||
|
||||
// 30%の確率でハイライト用ランキング更新
|
||||
if (Math.random() < 0.3) {
|
||||
// 30%の確率、3日以内に投稿されたノートの場合ハイライト用ランキング更新
|
||||
if (Math.random() < 0.3 && (Date.now() - this.idService.parse(renote.id).date.getTime()) < 1000 * 60 * 60 * 24 * 3) {
|
||||
if (renote.channelId != null) {
|
||||
if (renote.replyId == null) {
|
||||
this.featuredService.updateInChannelNotesRanking(renote.channelId, renote.id, 5);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue