From 25a6f7041af3ab846e379607aca57764991b406c Mon Sep 17 00:00:00 2001 From: syuilo Date: Sat, 14 Jul 2018 00:34:05 +0900 Subject: [PATCH] Fix bug --- src/services/note/create.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/services/note/create.ts b/src/services/note/create.ts index d29b62811..d4daa6f47 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -269,6 +269,8 @@ export default async (user: IUser, data: { // Publish note to local and hybrid timeline stream if (note.visibility != 'home') { publishLocalTimelineStream(noteObj); + } + if (note.visibility == 'public') { publishHybridTimelineStream(null, noteObj); } } @@ -281,9 +283,11 @@ export default async (user: IUser, data: { if (note.visibility == 'specified') { data.visibleUsers.forEach(async u => { - stream(u._id, 'note', await pack(note, u, { + const n = await pack(note, u, { detail: true - })); + }); + stream(u._id, 'note', n); + publishHybridTimelineStream(u._id, n); }); } @@ -304,10 +308,7 @@ export default async (user: IUser, data: { // Publish event to followers stream stream(following.followerId, 'note', noteObj); - - if (isRemoteUser(user)) { - publishHybridTimelineStream(following.followerId, noteObj); - } + publishHybridTimelineStream(following.followerId, noteObj); } else { //#region AP配送 // フォロワーがリモートユーザーかつ投稿者がローカルユーザーなら投稿を配信