diff --git a/src/posts.js b/src/posts.js index 99ec325a54..f287928ae6 100644 --- a/src/posts.js +++ b/src/posts.js @@ -203,7 +203,7 @@ marked.setOptions({ threadTools.notify_followers(tid, uid); user.getUserFields(uid, ['username','reputation','picture','signature'], function(data) { - + var timestamp = Date.now(); io.sockets.in('topic_' + tid).emit('event:new_post', { diff --git a/src/user.js b/src/user.js index 887263cba9..cc08d41cf1 100644 --- a/src/user.js +++ b/src/user.js @@ -11,7 +11,7 @@ var utils = require('./../public/src/utils.js'), (function(User) { User.getUserField = function(uid, field, callback) { - RDB.hget('user:'+uid, field, function(err, data){ + RDB.hget('user:'+uid, field, function(err, data) { if(err === null) callback(data); else @@ -20,7 +20,7 @@ var utils = require('./../public/src/utils.js'), } User.getUserFields = function(uid, fields, callback) { - RDB.hmget('user:'+uid, fields, function(err, data){ + RDB.hmget('user:'+uid, fields, function(err, data) { if(err === null) { var returnData = {}; @@ -50,7 +50,7 @@ var utils = require('./../public/src/utils.js'), for (var i=0, ii=uuids.length; i 150) - { + if(data['signature'] !== undefined && data['signature'].length > 150) { callback({error:'Signature can\'t be longer than 150 characters!'}); return; } @@ -126,11 +124,6 @@ var utils = require('./../public/src/utils.js'), userkeys.splice(anonUserIndex, 1); } - // removes user:1:following and user:1:followers, - need to find a better way for this - userkeys = userkeys.filter(function(value, index, self){ - return value.indexOf(':f') === -1; - }); - for(var i=0,ii=userkeys.length; i