diff options
| author | syuilo <syuilotan@yahoo.co.jp> | 2018-03-05 08:07:09 +0900 |
|---|---|---|
| committer | syuilo <syuilotan@yahoo.co.jp> | 2018-03-05 08:07:09 +0900 |
| commit | cb0d237b6a70ad118d3511930ef6cb1bca91cd76 (patch) | |
| tree | 967f723d292f34cd9c04a20710e21403cb672c45 /src/api/endpoints/posts | |
| parent | #304 (diff) | |
| download | sharkey-cb0d237b6a70ad118d3511930ef6cb1bca91cd76.tar.gz sharkey-cb0d237b6a70ad118d3511930ef6cb1bca91cd76.tar.bz2 sharkey-cb0d237b6a70ad118d3511930ef6cb1bca91cd76.zip | |
#1183
Diffstat (limited to 'src/api/endpoints/posts')
| -rw-r--r-- | src/api/endpoints/posts/create.ts | 6 | ||||
| -rw-r--r-- | src/api/endpoints/posts/polls/vote.ts | 6 | ||||
| -rw-r--r-- | src/api/endpoints/posts/reactions/create.ts | 6 |
3 files changed, 9 insertions, 9 deletions
diff --git a/src/api/endpoints/posts/create.ts b/src/api/endpoints/posts/create.ts index 57f98fa811..a9d52fd128 100644 --- a/src/api/endpoints/posts/create.ts +++ b/src/api/endpoints/posts/create.ts @@ -377,9 +377,9 @@ module.exports = (params, user: IUser, app) => new Promise(async (res, rej) => { }); // この投稿をWatchする - // TODO: ユーザーが「返信したときに自動でWatchする」設定を - // オフにしていた場合はしない - watch(user._id, reply); + if (user.settings.auto_watch !== false) { + watch(user._id, reply); + } // Add mention addMention(reply.user_id, 'reply'); diff --git a/src/api/endpoints/posts/polls/vote.ts b/src/api/endpoints/posts/polls/vote.ts index 5a4fd1c268..8222fe5326 100644 --- a/src/api/endpoints/posts/polls/vote.ts +++ b/src/api/endpoints/posts/polls/vote.ts @@ -100,9 +100,9 @@ module.exports = (params, user) => new Promise(async (res, rej) => { }); // この投稿をWatchする - // TODO: ユーザーが「投票したときに自動でWatchする」設定を - // オフにしていた場合はしない - watch(user._id, post); + if (user.settings.auto_watch !== false) { + watch(user._id, post); + } }); function findWithAttr(array, attr, value) { diff --git a/src/api/endpoints/posts/reactions/create.ts b/src/api/endpoints/posts/reactions/create.ts index 0b0e0e294d..93d9756d02 100644 --- a/src/api/endpoints/posts/reactions/create.ts +++ b/src/api/endpoints/posts/reactions/create.ts @@ -116,7 +116,7 @@ module.exports = (params, user) => new Promise(async (res, rej) => { }); // この投稿をWatchする - // TODO: ユーザーが「リアクションしたときに自動でWatchする」設定を - // オフにしていた場合はしない - watch(user._id, post); + if (user.settings.auto_watch !== false) { + watch(user._id, post); + } }); |