1
0

upd: Separate quote from boost

This commit is contained in:
Mar0xy
2023-10-15 02:16:02 +02:00
parent 4359a13946
commit 7e648a255f
7 changed files with 413 additions and 206 deletions
@@ -38,6 +38,7 @@ export const paramDef = {
type: 'object',
properties: {
noteId: { type: 'string', format: 'misskey:id' },
quote: { type: 'boolean', default: false },
},
required: ['noteId'],
} as const;
@@ -66,7 +67,11 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
});
for (const note of renotes) {
this.noteDeleteService.delete(await this.usersRepository.findOneByOrFail({ id: me.id }), note, false);
if (ps.quote) {
if (note.text) this.noteDeleteService.delete(await this.usersRepository.findOneByOrFail({ id: me.id }), note, false);
} else {
if (!note.text) this.noteDeleteService.delete(await this.usersRepository.findOneByOrFail({ id: me.id }), note, false);
}
}
});
}