forked from mirror/misskey
enhance(backend): 返信はハイライトに載らないように
This commit is contained in:
parent
10e50f71d1
commit
4a595153dc
@ -729,13 +729,17 @@ export class NoteCreateService implements OnApplicationShutdown {
|
||||
// 30%の確率でハイライト用ランキング更新
|
||||
if (Math.random() < 0.3) {
|
||||
if (renote.channelId != null) {
|
||||
if (renote.replyId == null) {
|
||||
this.featuredService.updateInChannelNotesRanking(renote.channelId, renote.id, 5);
|
||||
} else if (renote.visibility === 'public' && renote.userHost == null) {
|
||||
}
|
||||
} else {
|
||||
if (renote.visibility === 'public' && renote.userHost == null && renote.replyId == null) {
|
||||
this.featuredService.updateGlobalNotesRanking(renote.id, 5);
|
||||
this.featuredService.updatePerUserNotesRanking(renote.userId, renote.id, 5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@bindThis
|
||||
private async createMentionedEvents(mentionedUsers: MinimumUser[], note: MiNote, nm: NotificationManager) {
|
||||
|
@ -195,12 +195,16 @@ export class ReactionService {
|
||||
// 30%の確率でハイライト用ランキング更新
|
||||
if (Math.random() < 0.3 && note.userId !== user.id) {
|
||||
if (note.channelId != null) {
|
||||
if (note.replyId == null) {
|
||||
this.featuredService.updateInChannelNotesRanking(note.channelId, note.id, 1);
|
||||
} else if (note.visibility === 'public' && note.userHost == null) {
|
||||
}
|
||||
} else {
|
||||
if (note.visibility === 'public' && note.userHost == null && note.replyId == null) {
|
||||
this.featuredService.updateGlobalNotesRanking(note.id, 1);
|
||||
this.featuredService.updatePerUserNotesRanking(note.userId, note.id, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const meta = await this.metaService.fetch();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user