@microsoft/omnichannel-chat-widget 1.0.5-main.545bb43 → 1.0.5-main.b47afe8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -142,6 +142,14 @@ const LiveChatWidgetStateful = props => {
|
|
|
142
142
|
}
|
|
143
143
|
if (isChatValid === false) {
|
|
144
144
|
if (localState) {
|
|
145
|
+
// adding the reconnect logic for the case when customer tries to reconnect from a new browser or InPrivate browser
|
|
146
|
+
if ((0, _reconnectChatHelper.isReconnectEnabled)(props.chatConfig) === true) {
|
|
147
|
+
await (0, _reconnectChatHelper.handleChatReconnect)(chatSDK, props, dispatch, setAdapter, _startChat.initStartChat, state);
|
|
148
|
+
// If chat reconnect has kicked in chat state will become Active or Reconnect. So just exit, else go next
|
|
149
|
+
if (state.appStates.conversationState === _ConversationState.ConversationState.Active || state.appStates.conversationState === _ConversationState.ConversationState.ReconnectChat) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
145
153
|
await (0, _startChat.setPreChatAndInitiateChat)(chatSDK, dispatch, setAdapter, undefined, undefined, localState, props);
|
|
146
154
|
return;
|
|
147
155
|
} else {
|
|
@@ -134,6 +134,14 @@ export const LiveChatWidgetStateful = props => {
|
|
|
134
134
|
}
|
|
135
135
|
if (isChatValid === false) {
|
|
136
136
|
if (localState) {
|
|
137
|
+
// adding the reconnect logic for the case when customer tries to reconnect from a new browser or InPrivate browser
|
|
138
|
+
if (isReconnectEnabled(props.chatConfig) === true) {
|
|
139
|
+
await handleChatReconnect(chatSDK, props, dispatch, setAdapter, initStartChat, state);
|
|
140
|
+
// If chat reconnect has kicked in chat state will become Active or Reconnect. So just exit, else go next
|
|
141
|
+
if (state.appStates.conversationState === ConversationState.Active || state.appStates.conversationState === ConversationState.ReconnectChat) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
}
|
|
137
145
|
await setPreChatAndInitiateChat(chatSDK, dispatch, setAdapter, undefined, undefined, localState, props);
|
|
138
146
|
return;
|
|
139
147
|
} else {
|