From 37d426dddb3311119b038c073f80c5046d26f881 Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Wed, 25 Feb 2015 15:56:52 -0500 Subject: [PATCH] npnp, I totally meant to remove a method that's still in use... --- src/user/notifications.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/user/notifications.js b/src/user/notifications.js index 3a11b06a0a..c3ea4b9c23 100644 --- a/src/user/notifications.js +++ b/src/user/notifications.js @@ -39,6 +39,20 @@ var async = require('async'), }); }; + UserNotifications.getAll = function(uid, count, callback) { + getNotifications(uid, count, function(err, notifs) { + if (err) { + return callback(err); + } + notifs = notifs.unread.concat(notifs.read); + notifs = notifs.filter(Boolean).sort(function(a, b) { + return b.datetime - a.datetime; + }); + + callback(null, notifs); + }); + }; + function getNotifications(uid, count, callback) { async.parallel({ unread: function(next) {