From 3c194142a82a7441c8ee329432457350cc7008a2 Mon Sep 17 00:00:00 2001 From: syuilo Date: Sun, 20 Jan 2019 19:22:13 +0900 Subject: [PATCH] [Server] Fix #3928 --- CHANGELOG.md | 1 + src/server/api/stream/channels/global-timeline.ts | 6 ++++++ src/server/api/stream/channels/home-timeline.ts | 6 ++++++ src/server/api/stream/channels/hybrid-timeline.ts | 6 ++++++ src/server/api/stream/channels/local-timeline.ts | 6 ++++++ 5 files changed, 25 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3238d2bd7..c61c57581 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ unreleased * `__`でも太字構文を使えるように(アルファベットのみ) * ハッシュタグ判定の強化 * ストーク機能の廃止 +* ストリームで投稿が流れてきたとき、返信先が「この投稿は非公開です」となる問題を修正 * 関係のない返信がタイムラインに流れる問題を修正 * 常にメディアを閲覧注意として投稿するオプションが機能していなかった問題を修正 * クライアントのAPIリクエストをストリーム経由で行うオプションを廃止 diff --git a/src/server/api/stream/channels/global-timeline.ts b/src/server/api/stream/channels/global-timeline.ts index b09035dae..b3689d47f 100644 --- a/src/server/api/stream/channels/global-timeline.ts +++ b/src/server/api/stream/channels/global-timeline.ts @@ -28,6 +28,12 @@ export default class extends Channel { @autobind private async onNote(note: any) { + // リプライなら再pack + if (note.replyId != null) { + note.reply = await pack(note.replyId, this.user, { + detail: true + }); + } // Renoteなら再pack if (note.renoteId != null) { note.renote = await pack(note.renoteId, this.user, { diff --git a/src/server/api/stream/channels/home-timeline.ts b/src/server/api/stream/channels/home-timeline.ts index d3477d846..3c0b23872 100644 --- a/src/server/api/stream/channels/home-timeline.ts +++ b/src/server/api/stream/channels/home-timeline.ts @@ -22,6 +22,12 @@ export default class extends Channel { @autobind private async onNote(note: any) { + // リプライなら再pack + if (note.replyId != null) { + note.reply = await pack(note.replyId, this.user, { + detail: true + }); + } // Renoteなら再pack if (note.renoteId != null) { note.renote = await pack(note.renoteId, this.user, { diff --git a/src/server/api/stream/channels/hybrid-timeline.ts b/src/server/api/stream/channels/hybrid-timeline.ts index e573d27ee..35ef17b56 100644 --- a/src/server/api/stream/channels/hybrid-timeline.ts +++ b/src/server/api/stream/channels/hybrid-timeline.ts @@ -27,6 +27,12 @@ export default class extends Channel { @autobind private async onNewNote(note: any) { + // リプライなら再pack + if (note.replyId != null) { + note.reply = await pack(note.replyId, this.user, { + detail: true + }); + } // Renoteなら再pack if (note.renoteId != null) { note.renote = await pack(note.renoteId, this.user, { diff --git a/src/server/api/stream/channels/local-timeline.ts b/src/server/api/stream/channels/local-timeline.ts index 8e490677d..340202319 100644 --- a/src/server/api/stream/channels/local-timeline.ts +++ b/src/server/api/stream/channels/local-timeline.ts @@ -28,6 +28,12 @@ export default class extends Channel { @autobind private async onNote(note: any) { + // リプライなら再pack + if (note.replyId != null) { + note.reply = await pack(note.replyId, this.user, { + detail: true + }); + } // Renoteなら再pack if (note.renoteId != null) { note.renote = await pack(note.renoteId, this.user, {