From 6ce65039703cd3d920c0455168a9b27836feb5b9 Mon Sep 17 00:00:00 2001 From: barisusakli Date: Sun, 23 Aug 2015 14:21:43 -0400 Subject: [PATCH] mark register notif read when its rejected --- src/user/approval.js | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/user/approval.js b/src/user/approval.js index 22c59c5938..07c93ce0a8 100644 --- a/src/user/approval.js +++ b/src/user/approval.js @@ -120,7 +120,14 @@ module.exports = function(User) { } User.rejectRegistration = function(username, callback) { - removeFromQueue(username, callback); + async.waterfall([ + function (next) { + removeFromQueue(username, next); + }, + function (next) { + markNotificationRead(username, next); + } + ], callback); }; function removeFromQueue(username, callback) {