Skip to content

Commit

Permalink
Fix #310 : When user has never been seen, we create event "back-at-home"
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Gilles committed May 13, 2018
1 parent 5918dea commit 166680f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions api/core/house/house.userSeen.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ module.exports = function userSeen(options) {

// if user has never had events
if(rows.length === 0) {
return gladys.event.create({code: 'user-seen-at-home', user: options.user, house: options.house});
}
return gladys.event.create({code: 'back-at-home', user: options.user, house: options.house});
}

// if user was not at home
else if(rows[0].code === 'left-home') {
Expand Down

0 comments on commit 166680f

Please sign in to comment.