Files
NodeBB/src/socket.io/notifications.js
barisusakli 9e1789dc58 closes #2297
2014-11-05 20:41:31 -05:00

24 lines
476 B
JavaScript

"use strict";
var user = require('../user'),
SocketNotifs = {};
SocketNotifs.get = function(socket, data, callback) {
user.notifications.get(socket.uid, callback);
};
SocketNotifs.getCount = function(socket, data, callback) {
user.notifications.getUnreadCount(socket.uid, callback);
};
SocketNotifs.deleteAll = function(socket, data, callback) {
if (!socket.uid) {
return;
}
user.notifications.deleteAll(socket.uid, callback);
};
module.exports = SocketNotifs;