diff --git a/modules/users/api.js b/modules/users/api.js index 6ec0ce5..5f6d515 100644 --- a/modules/users/api.js +++ b/modules/users/api.js @@ -24,9 +24,9 @@ var api = function(dbot) { var toMatch = new RegExp(user, "i"); if(alias.match(toMatch) !== null) return nick; }, this); + if(!_.isUndefined(resolvedUser)) user = resolvedUser; } - user = resolvedUser; } return user;