3
0
mirror of https://github.com/reality/dbot.git synced 2024-12-24 11:42:36 +01:00

Check getProfile read was successful

This commit is contained in:
Sam Nicholls 2013-04-21 15:27:08 +01:00
parent 0d76ce4166
commit 3130350f58

View File

@ -31,7 +31,12 @@ var api = function(dbot) {
dbot.api.users.resolveUser(server, nick, function(user){
if(user){
this.db.read('profiles', user.id, function(err, profile){
callback(false, user, profile);
if(!err){
callback(false, user, profile);
}
else{
callback(true, null, null);
}
});
}
else{