call NoteEntityService.hideNote from streaming API

This commit is contained in:
Hazelnoot 2025-02-25 20:55:24 -05:00
parent 30b2bfb184
commit 18f211e3bc
10 changed files with 22 additions and 1 deletions

View file

@ -82,7 +82,19 @@ export default abstract class Channel {
return false;
}
constructor(id: string, connection: Connection) {
protected async hideNote(note: Packed<'Note'>): Promise<void> {
if (note.renote) {
await this.hideNote(note.renote);
}
if (note.reply) {
await this.hideNote(note.reply);
}
const meId = this.user?.id ?? null;
await this.noteEntityService.hideNote(note, meId);
}
constructor(id: string, connection: Connection, noteEntityService: NoteEntityService) {
this.id = id;
this.connection = connection;