Skip to content

Commit

Permalink
chore(react): update values consistently when session is refreshed
Browse files Browse the repository at this point in the history
  • Loading branch information
vanbasten17 committed Oct 11, 2021
1 parent be03ca4 commit 765c569
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/botonic-react/src/experimental/webchat/webchat.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,11 @@ export const Webchat = forwardRef((props, ref) => {
}
if (initialSession) updateSession(merge(initialSession, session))
if (lastRoutePath) updateLastRoutePath(lastRoutePath)
} else updateSession(merge(initialSession, session))
} else {
session.__retries = 0
session.is_first_interaction = true
updateSession(merge(initialSession, session))
}
if (devSettings) updateDevSettings(devSettings)
else if (initialDevSettings) updateDevSettings(initialDevSettings)
if (lastMessageUpdate) updateLastMessageDate(lastMessageUpdate)
Expand Down

0 comments on commit 765c569

Please sign in to comment.