Skip to content

Commit

Permalink
feat(app): Add attached pipette info to intercom support
Browse files Browse the repository at this point in the history
closes #2019
  • Loading branch information
Kadee80 committed Aug 27, 2018
1 parent 4a1430d commit 1eefe70
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion app/src/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,14 @@ export const supportMiddleware: Middleware = (store) => (next) => (action) => {
const robot = state.robot.connection.connectRequest.name
const data = {user_id: userId, 'Robot Name': robot}
log.debug('Updating intercom data', {data})
intercom('update', {data})
intercom('update', {...data})
}

if (action.type === 'api:PIPETTES_SUCCESS') {
const pipettes = action.payload.pipettes
const data = {user_id: userId, 'Pipettes': pipettes}
log.debug('Updating intercom data', {data})
intercom('update', {...data})
}

return next(action)
Expand Down

0 comments on commit 1eefe70

Please sign in to comment.