forked from GitHub/dbot
final fixes
This commit is contained in:
parent
15e3971f11
commit
64e7294233
@ -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,
|
||||||
|
@ -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) {
|
||||||
|
Loading…
Reference in New Issue
Block a user