From d366be796795f2481edd8d5434cb798d9b7c581d Mon Sep 17 00:00:00 2001 From: barisusakli Date: Wed, 9 Apr 2014 21:22:37 -0400 Subject: [PATCH] added error key --- src/socket.io/categories.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/socket.io/categories.js b/src/socket.io/categories.js index 0dd546ef16..eaa6eb0966 100644 --- a/src/socket.io/categories.js +++ b/src/socket.io/categories.js @@ -13,7 +13,7 @@ SocketCategories.getRecentReplies = function(socket, cid, callback) { return callback(err); } - if (privileges && !privileges.read) { + if (!privileges || !privileges.read) { return callback(null, []); } @@ -27,7 +27,7 @@ SocketCategories.get = function(socket, data, callback) { SocketCategories.loadMore = function(socket, data, callback) { if(!data) { - return callback(new Error('invalid data')); + return callback(new Error('[[error:invalid-data]]')); } user.getSettings(socket.uid, function(err, settings) {