diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2019-01-21 12:19:20 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2019-01-21 12:19:20 +0900 |
| commit | 6bbccedb2db040fb70ea0176e78bcb84daf9109e (patch) | |
| tree | a9781d5f9feac87d87716f91c529429b579aa23d /src/services | |
| parent | [Client] Fix bug (diff) | |
| download | sharkey-6bbccedb2db040fb70ea0176e78bcb84daf9109e.tar.gz sharkey-6bbccedb2db040fb70ea0176e78bcb84daf9109e.tar.bz2 sharkey-6bbccedb2db040fb70ea0176e78bcb84daf9109e.zip | |
[Server] Fix #3528
Diffstat (limited to 'src/services')
| -rw-r--r-- | src/services/note/create.ts | 15 |
1 files changed, 14 insertions, 1 deletions
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); + } } } |