From 1fea2cdcbe341bb56be1cd2b79a8115b482fab65 Mon Sep 17 00:00:00 2001 From: syuilo Date: Tue, 11 Sep 2018 20:57:25 +0900 Subject: Fix bug --- src/server/api/stream/home.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/server/api/stream/home.ts') diff --git a/src/server/api/stream/home.ts b/src/server/api/stream/home.ts index dc3ce9d19f..5f3b6744b2 100644 --- a/src/server/api/stream/home.ts +++ b/src/server/api/stream/home.ts @@ -36,6 +36,13 @@ export default async function( // Subscribe Home stream channel subscriber.on(`user-stream:${user._id}`, async x => { + // Renoteなら再pack + if (x.type == 'note' && x.body.renoteId != null) { + x.body.renote = await pack(x.body.renoteId, user, { + detail: true + }); + } + //#region 流れてきたメッセージがミュートしているユーザーが関わるものだったら無視する if (x.type == 'note') { if (mutedUserIds.includes(x.body.userId)) { @@ -54,13 +61,6 @@ export default async function( } //#endregion - // Renoteなら再pack - if (x.type == 'note' && x.body.renoteId != null) { - x.body.renote = await pack(x.body.renoteId, user, { - detail: true - }); - } - connection.send(JSON.stringify(x)); }); -- cgit v1.2.3-freya