function isMainPost(tid, pid, callback) {
RDB.lrange('tid:' + tid + ':posts', 0, 0, function(err, pids) {
if(err) {
return callback(err, null);
}
callback(null, pids[0] === pid);
});
}
Kool, looks like there is already a function PostTools.isMain to do that after further investigation. Will see what i can do with that.