Skip to content

Commit

Permalink
fix issue #1
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Brown committed Jan 3, 2017
1 parent 92280ee commit b4fed27
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions components/user_registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,17 @@ module.exports = function(controller) {
};

var testbot = controller.spawn(team.bot);

testbot.api.auth.test({}, function(err, bot_auth) {
if (err) {
debug('Error: could not authenticate bot user', err);
} else {
team.bot.name = bot_auth.user;

// add in info that is expected by Botkit
testbot.identity = bot_auth;
testbot.team_info = team;

// Replace this with your own database!

controller.storage.teams.save(team, function(err, id) {
Expand Down

0 comments on commit b4fed27

Please sign in to comment.