also delete AP logs for cascading notes

This commit is contained in:
Hazelnoot 2025-05-11 05:06:25 -04:00
parent 7cb7ed6fc9
commit b22b5577b4

View file

@ -165,8 +165,11 @@ export class NoteDeleteService {
});
}
if (note.uri) {
this.apLogService.deleteObjectLogs(note.uri)
const deletedUris = [note, ...cascadingNotes]
.map(n => n.uri)
.filter((u): u is string => u != null);
if (deletedUris.length > 0) {
this.apLogService.deleteObjectLogs(deletedUris)
.catch(err => this.logger.error(err, `Failed to delete AP logs for note '${note.uri}'`));
}
}