final fixes

This commit is contained in:
reality 2014-09-05 13:51:51 +00:00
parent 15e3971f11
commit 64e7294233
2 changed files with 6 additions and 1 deletions

View File

@ -9,6 +9,7 @@ var api = function(dbot) {
* TODO(@samstudio8) Migrate to internalAPI * TODO(@samstudio8) Migrate to internalAPI
*/ */
"createProfile": function(user, callback){ "createProfile": function(user, callback){
if(!callback) callback = function(){};
if(user){ if(user){
this.db.create('profiles', user.id, { this.db.create('profiles', user.id, {
'id': user.id, 'id': user.id,

View File

@ -22,7 +22,11 @@ var pages = function(dbot) {
}, function(err) { }, function(err) {
async.eachSeries(userIds, function(id, callback) { async.eachSeries(userIds, function(id, callback) {
dbot.api.users.getUser(id, function(err, user) { dbot.api.users.getUser(id, function(err, user) {
if(user) {
userNicks.push(user.primaryNick); userNicks.push(user.primaryNick);
} else {
userNicks.push(id);
}
callback(false); callback(false);
}); });
}, function(err) { }, function(err) {