Merge pull request #3010 from jtbairdsr/master

fix error in notifications cleanup cron
This commit is contained in:
Lauri Ojansivu 2020-04-12 16:50:19 +03:00 committed by GitHub
commit dc643f3d43
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -952,6 +952,7 @@ const addCronJob = _.debounce(
schedule: parser => parser.text('every 1 days'),
job: () => {
for (const user of Users.find()) {
if (!user.profile || !user.profile.notifications) continue;
for (const notification of user.profile.notifications) {
if (notification.read) {
const removeDate = new Date(notification.read);