diff --git a/CHANGELOG_CHERRYPICK.md b/CHANGELOG_CHERRYPICK.md new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/backend/migration/1696318192428-noteUpdatedAtHistory.js b/packages/backend/migration/1696318192428-noteUpdatedAtHistory.js new file mode 100644 index 0000000000..70220f3058 --- /dev/null +++ b/packages/backend/migration/1696318192428-noteUpdatedAtHistory.js @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey, cherrypick contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +export class NoteUpdateAtHistory1696318192428 { + name = 'NoteUpdateAtHistory1696318192428' + + async up(queryRunner) { + await queryRunner.query(`ALTER TABLE "note" ADD "updatedAtHistory" TIMESTAMP WITH TIME ZONE array`); + } + + async down(queryRunner) { + await queryRunner.query(`ALTER TABLE "note" DROP "updatedAtHistory"`); + } + +} diff --git a/packages/backend/src/core/entities/NoteEntityService.ts b/packages/backend/src/core/entities/NoteEntityService.ts index 6438486ebd..a016c0a101 100644 --- a/packages/backend/src/core/entities/NoteEntityService.ts +++ b/packages/backend/src/core/entities/NoteEntityService.ts @@ -324,6 +324,7 @@ export class NoteEntityService implements OnModuleInit { id: note.id, createdAt: this.idService.parse(note.id).date.toISOString(), updatedAt: note.updatedAt ? note.updatedAt.toISOString() : undefined, + updatedAtHistory: note.updatedAtHistory ? note.updatedAtHistory.map(x => x.toISOString()) : undefined, noteEditHistory: note.noteEditHistory.length ? note.noteEditHistory : undefined, userId: note.userId, user: this.userEntityService.pack(note.user ?? note.userId, me), diff --git a/packages/backend/src/models/Note.ts b/packages/backend/src/models/Note.ts index 0cc12e38d1..03f410dab0 100644 --- a/packages/backend/src/models/Note.ts +++ b/packages/backend/src/models/Note.ts @@ -19,6 +19,12 @@ export class MiNote { }) public updatedAt: Date | null; + @Column('timestamp with time zone', { + array: true, + default: null, + }) + public updatedAtHistory: Date[] | null; + @Column('varchar', { length: 3000, array: true, diff --git a/packages/backend/src/models/json-schema/note.ts b/packages/backend/src/models/json-schema/note.ts index 0e36662f80..3e1d4500f5 100644 --- a/packages/backend/src/models/json-schema/note.ts +++ b/packages/backend/src/models/json-schema/note.ts @@ -22,6 +22,15 @@ export const packedNoteSchema = { optional: true, nullable: true, format: 'date-time', }, + updatedAtHistory: { + type: 'array', + optional: true, nullable: true, + items: { + type: 'string', + optional: false, nullable: false, + format: 'date-time', + }, + }, noteEditHistory: { type: 'array', optional: true, nullable: false, diff --git a/packages/cherrypick-js/src/entities.ts b/packages/cherrypick-js/src/entities.ts new file mode 100644 index 0000000000..e69de29bb2 diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 626021395d..2cbc8ffcaa 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -77,7 +77,6 @@ SPDX-License-Identifier: AGPL-3.0-only v-if="appearNote.text" :parsedNodes="parsed" :text="appearNote.text" - :author="appearNote.user" :nyaize="'respect'" :emojiUrls="appearNote.emojis" :enableEmojiMenu="true" @@ -88,7 +87,7 @@ SPDX-License-Identifier: AGPL-3.0-only
{{ i18n.tsx.translatedFrom({ x: translation.sourceLang }) }}: - +
@@ -143,12 +142,11 @@ SPDX-License-Identifier: AGPL-3.0-only
- - -
+ +
@@ -186,26 +184,39 @@ SPDX-License-Identifier: AGPL-3.0-only
-
- +
+ +
+
+ + +
+
+
+ +
+ +
+
+
+
+ +
{{ i18n.ts.nothing }}
-
- - - -