mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-05 15:20:39 +01:00
allow array of nids to be passed to notifs.get
This commit is contained in:
@@ -5,7 +5,11 @@ var user = require('../user'),
|
||||
SocketNotifs = {};
|
||||
|
||||
SocketNotifs.get = function(socket, data, callback) {
|
||||
user.notifications.get(socket.uid, callback);
|
||||
if (data && Array.isArray(data.nids) && socket.uid) {
|
||||
user.notifications.getNotifications(data.nids, socket.uid, callback);
|
||||
} else {
|
||||
user.notifications.get(socket.uid, callback);
|
||||
}
|
||||
};
|
||||
|
||||
SocketNotifs.getCount = function(socket, data, callback) {
|
||||
|
||||
Reference in New Issue
Block a user