enhance: improve moderation log

This commit is contained in:
syuilo 2023-09-25 10:29:12 +09:00
parent 646a8d1a54
commit 5318532a8d
19 changed files with 209 additions and 60 deletions

View file

@ -135,9 +135,12 @@ export class NoteDeleteService {
});
if (deleter && (note.userId !== deleter.id)) {
const user = await this.usersRepository.findOneByOrFail({ id: note.userId });
this.moderationLogService.log(deleter, 'deleteNote', {
noteId: note.id,
noteUserId: note.userId,
noteUserUsername: user.username,
noteUserHost: user.host,
note: note,
});
}