From b241967fb98dad3f29ea7d28215166256732a282 Mon Sep 17 00:00:00 2001 From: MeiMei <30769358+mei23@users.noreply.github.com> Date: Sun, 24 Nov 2019 08:31:57 +0900 Subject: [PATCH] =?UTF-8?q?Fix:=20=E3=83=AD=E3=83=BC=E3=82=AB=E3=83=AB?= =?UTF-8?q?=E3=81=AB=E3=83=95=E3=82=A9=E3=83=AD=E3=83=AF=E3=83=BC=E9=99=90?= =?UTF-8?q?=E5=AE=9A=E6=8A=95=E7=A8=BF=E3=81=8C=E6=B5=81=E3=82=8C=E3=81=A6?= =?UTF-8?q?=E3=81=8F=E3=82=8B=20(#5598)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/stream/channels/local-timeline.ts | 30 +++++++------------ 1 file changed, 10 insertions(+), 20 deletions(-) diff --git a/src/server/api/stream/channels/local-timeline.ts b/src/server/api/stream/channels/local-timeline.ts index 24cbc0a7bf..e31e5c59cb 100644 --- a/src/server/api/stream/channels/local-timeline.ts +++ b/src/server/api/stream/channels/local-timeline.ts @@ -25,29 +25,19 @@ export default class extends Channel { @autobind private async onNote(note: PackedNote) { if ((note.user as PackedUser).host !== null) return; - if (note.visibility === 'home') return; + if (note.visibility !== 'public') return; - if (['followers', 'specified'].includes(note.visibility)) { - note = await Notes.pack(note.id, this.user, { + // リプライなら再pack + if (note.replyId != null) { + note.reply = await Notes.pack(note.replyId, this.user, { + detail: true + }); + } + // Renoteなら再pack + if (note.renoteId != null) { + note.renote = await Notes.pack(note.renoteId, this.user, { detail: true }); - - if (note.isHidden) { - return; - } - } else { - // リプライなら再pack - if (note.replyId != null) { - note.reply = await Notes.pack(note.replyId, this.user, { - detail: true - }); - } - // Renoteなら再pack - if (note.renoteId != null) { - note.renote = await Notes.pack(note.renoteId, this.user, { - detail: true - }); - } } // 流れてきたNoteがミュートしているユーザーが関わるものだったら無視する