Skip to content

Commit

Permalink
Bug fix (#99)
Browse files Browse the repository at this point in the history
* Log new user log

* Fixing bug with user creation
  • Loading branch information
O-Mutt committed Oct 1, 2021
1 parent 0adbf1e commit c38fa3b
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hubot-plusplus-expanded",
"version": "3.3.1",
"version": "3.3.2",
"description": "A hubot script for micro praise",
"main": "index.js",
"engines": {
Expand Down
2 changes: 2 additions & 0 deletions src/lib/data/scores.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ const createNewLevelOneUser = (user, robotName) => {
}
if (user.profile && user.profile.email) {
newUser.slackEmail = user.profile.email;
} else if (user.info && user.info.email_address) {
newUser.slackEmail = user.info.email_address;
}
return newUser;
};
Expand Down
1 change: 1 addition & 0 deletions src/lib/services/database.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class DatabaseService {
);

if (!dbUser) {
this.robot.logger.debug('creating a new user', user);
const newUser = createNewLevelOneUser(user, this.robot.name);
return newUser;
}
Expand Down

0 comments on commit c38fa3b

Please sign in to comment.