From 763bd775c436000462d6fdaa598af1f8d7277b4e Mon Sep 17 00:00:00 2001 From: Julian Lam Date: Thu, 3 Oct 2013 21:18:59 -0400 Subject: [PATCH] closed #380 --- src/threadTools.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/threadTools.js b/src/threadTools.js index bd0c1a126c..6f7b9bbaf7 100644 --- a/src/threadTools.js +++ b/src/threadTools.js @@ -265,14 +265,15 @@ var RDB = require('./redis.js'), ThreadTools.get_followers = function(tid, callback) { RDB.smembers('tid:' + tid + ':followers', function(err, followers) { - callback(err, followers); + callback(err, followers.map(function(follower) { + return parseInt(follower, 10); + })); }); } ThreadTools.notify_followers = function(tid, exceptUid) { async.parallel([ function(next) { - topics.getTopicField(tid, 'title', function(err, title) { topics.getTeaser(tid, function(err, teaser) { if (!err) { @@ -282,11 +283,10 @@ var RDB = require('./redis.js'), } else next(err); }); }); - - }, function(next) { ThreadTools.get_followers(tid, function(err, followers) { + exceptUid = parseInt(exceptUid, 10); if (followers.indexOf(exceptUid) !== -1) followers.splice(followers.indexOf(exceptUid), 1); next(null, followers); });