Skip to content

Commit

Permalink
chore: exclude おはnote from featured
Browse files Browse the repository at this point in the history
  • Loading branch information
anatawa12 committed Nov 24, 2023
1 parent ec50aef commit 45f0a72
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/backend/src/core/FeaturedService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,16 @@ export class FeaturedService {
if (note.replyId != null) return false; // reply
// Channels are checked outside

// In nirila misskey, it was very common to notes with `:ohayo_nirila_misskey:` or `:oyasumi_nirila_misskey:`
// Will get many reaction`:ohayo_nirila_misskey:` or `:oyasumi_nirila_misskey:` so exclude them
// if they don't have any images.
if (note.fileIds.length === 0) {
for (const exclusion of ["おはよう", "おやすみ", ":ohayo_nirila_misskey:", ":oyasumi_nirila_misskey:"]) {
if (note.text?.includes(exclusion)) return false;
if (note.cw?.includes(exclusion)) return false;
}
}

return true;
}

Expand Down

0 comments on commit 45f0a72

Please sign in to comment.