From 6bbccedb2db040fb70ea0176e78bcb84daf9109e Mon Sep 17 00:00:00 2001 From: syuilo Date: Mon, 21 Jan 2019 12:19:20 +0900 Subject: [Server] Fix #3528 --- src/services/note/create.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'src/services/note') diff --git a/src/services/note/create.ts b/src/services/note/create.ts index b5e5c4e49c..fbafe29107 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -369,6 +369,13 @@ async function publish(user: IUser, note: INote, noteObj: any, reply: INote, ren // Publish event to myself's stream publishHomeTimelineStream(note.userId, detailPackedNote); publishHybridTimelineStream(note.userId, detailPackedNote); + + if (note.visibility == 'specified') { + for (const u of visibleUsers) { + publishHomeTimelineStream(u._id, detailPackedNote); + publishHybridTimelineStream(u._id, detailPackedNote); + } + } } else { // Publish event to myself's stream publishHomeTimelineStream(note.userId, noteObj); @@ -526,7 +533,13 @@ async function publishToUserLists(note: INote, noteObj: any) { }); for (const list of lists) { - publishUserListStream(list._id, 'note', noteObj); + if (note.visibility == 'specified') { + if (note.visibleUserIds.some(id => id.equals(list.userId))) { + publishUserListStream(list._id, 'note', noteObj); + } + } else { + publishUserListStream(list._id, 'note', noteObj); + } } } -- cgit v1.2.3-freya