summaryrefslogtreecommitdiff
path: root/src/server/api/endpoints/notifications
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2018-05-22 11:45:49 +0900
committersyuilo <syuilotan@yahoo.co.jp>2018-05-22 11:45:49 +0900
commit89dee86f3917a13d27043c0b744cd5b9f9ef93b9 (patch)
treede843bbfe0098637225faa2c40f4b512992be61d /src/server/api/endpoints/notifications
parentRefactor (diff)
downloadsharkey-89dee86f3917a13d27043c0b744cd5b9f9ef93b9.tar.gz
sharkey-89dee86f3917a13d27043c0b744cd5b9f9ef93b9.tar.bz2
sharkey-89dee86f3917a13d27043c0b744cd5b9f9ef93b9.zip
Fix bug and remove unnecessary query
Diffstat (limited to 'src/server/api/endpoints/notifications')
-rw-r--r--src/server/api/endpoints/notifications/get_unread_count.ts3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/server/api/endpoints/notifications/get_unread_count.ts b/src/server/api/endpoints/notifications/get_unread_count.ts
index 600a80d194..9766366ff1 100644
--- a/src/server/api/endpoints/notifications/get_unread_count.ts
+++ b/src/server/api/endpoints/notifications/get_unread_count.ts
@@ -9,8 +9,7 @@ import Mute from '../../../../models/mute';
*/
module.exports = (params, user) => new Promise(async (res, rej) => {
const mute = await Mute.find({
- muterId: user._id,
- deletedAt: { $exists: false }
+ muterId: user._id
});
const mutedUserIds = mute.map(m => m.muteeId);