Merge pull request #10939 from overleaf/em-upgrade-mongo-notifications

Upgrade Mongo driver in notifications

GitOrigin-RevId: 3a504471b21873e614e617d81c15c3e17ce7fdc0
This commit is contained in:
Eric Mc Sween
2022-12-21 09:05:28 +00:00
committed by Copybot
parent 269f5f58c2
commit efd30fae15
6 changed files with 110 additions and 47 deletions
@@ -13,7 +13,6 @@
const { db, ObjectId } = require('./mongodb')
const request = require('request')
const async = require('async')
const _ = require('underscore')
const settings = require('@overleaf/settings')
const { port } = settings.internal.notifications
const logger = require('@overleaf/logger')
@@ -56,8 +55,7 @@ module.exports = {
logger.err({ err }, e)
return cb(e)
}
const hasNotification = _.some(
body,
const hasNotification = body.some(
notification =>
notification.key === notification_key &&
notification.user_id === user_id.toString()