wip: 古いノートの情報を記録するように

This commit is contained in:
GrapeApple0 2024-06-14 08:21:50 +00:00
parent 28bb6efe6c
commit b2cb18e164
1 changed files with 10 additions and 10 deletions

View File

@ -311,16 +311,16 @@ export class NoteEditService implements OnApplicationShutdown {
} }
this.noteHistoryRepository.insert(new MiNoteHistory({ this.noteHistoryRepository.insert(new MiNoteHistory({
id: this.idService.gen(), id: this.idService.gen(),
text: note.text, text: targetNote.text,
cw: note.cw, cw: targetNote.cw,
targetId: note.id, targetId: targetNote.id,
fileIds: note.fileIds, fileIds: targetNote.fileIds,
attachedFileTypes: note.attachedFileTypes, attachedFileTypes: targetNote.attachedFileTypes,
mentions: note.mentions, mentions: targetNote.mentions,
mentionedRemoteUsers: note.mentionedRemoteUsers, mentionedRemoteUsers: targetNote.mentionedRemoteUsers,
emojis: note.emojis, emojis: targetNote.emojis,
tags: note.tags, tags: targetNote.tags,
hasPoll: note.hasPoll, hasPoll: targetNote.hasPoll,
})); }));
setImmediate('post updated', { signal: this.#shutdownController.signal }).then( setImmediate('post updated', { signal: this.#shutdownController.signal }).then(
async () => this.postNoteEdited((await this.notesRepository.findOneByOrFail({ id: note.id })), user, data, silent, tags!, mentionedUsers!), async () => this.postNoteEdited((await this.notesRepository.findOneByOrFail({ id: note.id })), user, data, silent, tags!, mentionedUsers!),