closes #742, closes #741

This commit is contained in:
Baris Soner Usakli
2014-01-07 17:30:29 -05:00
parent 6f94acd0f2
commit a4ae9c70df
8 changed files with 158 additions and 26 deletions

View File

@@ -17,12 +17,12 @@ var winston = require('winston'),
(function(PostTools) {
PostTools.isMain = function(pid, tid, callback) {
db.getListRange('tid:' + tid + ':posts', 0, 0, function(err, pids) {
db.getSortedSetRange('tid:' + tid + ':posts', 0, 0, function(err, pids) {
if(err) {
return callback(err);
}
callback(null, pids[0] === pid);
callback(null, parseInt(pids[0], 10) === parseInt(pid, 10));
});
}