diff --git a/CHANGELOG.md b/CHANGELOG.md index a1ba13339..87343664e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ unreleased * 返信するときにCWを維持するかどうか設定できるように * 外部サービス認証情報の配信 * 管理画面のモデレーションのUIを強化 +* 引用投稿を削除したとき単なるRenoteとしてタイムラインに残る問題を修正 * イタリック構文の判定の改善 * テーマが反映されないことがある問題を修正 * ホームにフォロワー限定投稿が表示されない問題を修正 diff --git a/src/client/app/common/scripts/note-subscriber.ts b/src/client/app/common/scripts/note-subscriber.ts index 9545b5406..c2b4dd6df 100644 --- a/src/client/app/common/scripts/note-subscriber.ts +++ b/src/client/app/common/scripts/note-subscriber.ts @@ -133,6 +133,7 @@ export default prop => ({ case 'deleted': { Vue.set(this.$_ns_target, 'deletedAt', body.deletedAt); + Vue.set(this.$_ns_target, 'renote', null); this.$_ns_target.text = null; this.$_ns_target.tags = []; this.$_ns_target.fileIds = []; diff --git a/src/services/note/delete.ts b/src/services/note/delete.ts index 9709eeaf5..e8ce181d5 100644 --- a/src/services/note/delete.ts +++ b/src/services/note/delete.ts @@ -30,12 +30,25 @@ export default async function(user: IUser, note: INote) { text: null, tags: [], fileIds: [], + renoteId: null, poll: null, geo: null, cw: null } }); + if (note.renoteId) { + Note.update({ _id: note.renoteId }, { + $inc: { + renoteCount: -1, + score: -1 + }, + $pull: { + _quoteIds: note._id + } + }); + } + publishNoteStream(note._id, 'deleted', { deletedAt: deletedAt });