mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-02-06 23:00:08 +01:00
migrating notifications to new socketAL format
This commit is contained in:
@@ -2,14 +2,14 @@ var user = require('../user'),
|
||||
|
||||
SocketNotifs = {};
|
||||
|
||||
SocketNotifs.get = function(data, callback, sessionData) {
|
||||
user.notifications.get(sessionData.uid, function(notifs) {
|
||||
SocketNotifs.get = function(socket, data, callback) {
|
||||
user.notifications.get(socket.uid, function(notifs) {
|
||||
callback(notifs);
|
||||
});
|
||||
};
|
||||
|
||||
SocketNotifs.getCount = function(callback, sessionData) {
|
||||
user.notifications.getUnreadCount(sessionData.uid, function(err, count) {
|
||||
SocketNotifs.getCount = function(socket, callback) {
|
||||
user.notifications.getUnreadCount(socket.uid, function(err, count) {
|
||||
callback(err ? err.message : null, count);
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user