upd: Separate quote from boost

This commit is contained in:
Mar0xy 2023-10-15 02:16:02 +02:00
parent 4359a13946
commit 7e648a255f
No known key found for this signature in database
GPG key ID: 56569BBE47D2C828
7 changed files with 413 additions and 206 deletions

View file

@ -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);
}
}
});
}