From c99e864dbc2c64e940bbe3f63d9688e15553e4b8 Mon Sep 17 00:00:00 2001 From: Aya Morisawa Date: Sat, 14 Jul 2018 19:49:21 +0900 Subject: [PATCH] :sparkles: --- src/daemons/notes-stats.ts | 2 +- src/services/note/create.ts | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/daemons/notes-stats.ts b/src/daemons/notes-stats.ts index 54ce746de..136ccb60c 100644 --- a/src/daemons/notes-stats.ts +++ b/src/daemons/notes-stats.ts @@ -3,7 +3,7 @@ import Xev from 'xev'; const ev = new Xev(); -export default function () { +export default function() { const log: any[] = []; const p = childProcess.fork(__dirname + '/notes-stats-child.js'); diff --git a/src/services/note/create.ts b/src/services/note/create.ts index 015227d41..aec0e7896 100644 --- a/src/services/note/create.ts +++ b/src/services/note/create.ts @@ -308,7 +308,7 @@ export default async (user: IUser, data: { // Publish event to followers stream stream(following.followerId, 'note', noteObj); - + if (isRemoteUser(user) || note.visibility != 'public') { publishHybridTimelineStream(following.followerId, noteObj); } @@ -363,14 +363,14 @@ export default async (user: IUser, data: { // 削除されたドキュメントは除く deletedAt: { $exists: false } }, { - fields: { - userId: true - } - }).then(watchers => { - watchers.forEach(watcher => { - nm.push(watcher.userId, 'reply'); + fields: { + userId: true + } + }).then(watchers => { + watchers.forEach(watcher => { + nm.push(watcher.userId, 'reply'); + }); }); - }); // この投稿をWatchする if (isLocalUser(user) && user.settings.autoWatch !== false) { @@ -392,14 +392,14 @@ export default async (user: IUser, data: { noteId: data.renote._id, userId: { $ne: user._id } }, { - fields: { - userId: true - } - }).then(watchers => { - watchers.forEach(watcher => { - nm.push(watcher.userId, type); + fields: { + userId: true + } + }).then(watchers => { + watchers.forEach(watcher => { + nm.push(watcher.userId, type); + }); }); - }); // この投稿をWatchする if (isLocalUser(user) && user.settings.autoWatch !== false) {