@microsoft/omnichannel-chat-widget 1.2.1-main.dd977a7 → 1.2.2-main.a09cee4
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.
|
@@ -529,14 +529,14 @@ const LiveChatWidgetStateful = props => {
|
|
|
529
529
|
}
|
|
530
530
|
|
|
531
531
|
// If start chat failed, and C2 is trying to close chat widget
|
|
532
|
-
if (state !== null && state !== void 0 && (_state$appStates9 = state.appStates) !== null && _state$appStates9 !== void 0 && _state$appStates9.startChatFailed) {
|
|
532
|
+
if (state !== null && state !== void 0 && (_state$appStates9 = state.appStates) !== null && _state$appStates9 !== void 0 && _state$appStates9.startChatFailed || (state === null || state === void 0 ? void 0 : (_state$appStates10 = state.appStates) === null || _state$appStates10 === void 0 ? void 0 : _state$appStates10.conversationState) === _ConversationState.ConversationState.Postchat) {
|
|
533
533
|
(0, _endChat.endChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, true, false, true, uwid.current);
|
|
534
534
|
return;
|
|
535
535
|
}
|
|
536
536
|
|
|
537
537
|
// Scenario -> Chat was InActive and closing the chat (Refresh scenario on post chat)
|
|
538
|
-
if ((state === null || state === void 0 ? void 0 : (_state$
|
|
539
|
-
(0, _endChat.endChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter,
|
|
538
|
+
if ((state === null || state === void 0 ? void 0 : (_state$appStates11 = state.appStates) === null || _state$appStates11 === void 0 ? void 0 : _state$appStates11.conversationState) === _ConversationState.ConversationState.InActive) {
|
|
539
|
+
(0, _endChat.endChat)(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true, uwid.current);
|
|
540
540
|
return;
|
|
541
541
|
}
|
|
542
542
|
if ((state === null || state === void 0 ? void 0 : (_state$appStates12 = state.appStates) === null || _state$appStates12 === void 0 ? void 0 : _state$appStates12.conversationEndedBy) === _Constants.ConversationEndEntity.Agent || (state === null || state === void 0 ? void 0 : (_state$appStates13 = state.appStates) === null || _state$appStates13 === void 0 ? void 0 : _state$appStates13.conversationEndedBy) === _Constants.ConversationEndEntity.Bot) {
|
|
@@ -521,14 +521,14 @@ export const LiveChatWidgetStateful = props => {
|
|
|
521
521
|
}
|
|
522
522
|
|
|
523
523
|
// If start chat failed, and C2 is trying to close chat widget
|
|
524
|
-
if (state !== null && state !== void 0 && (_state$appStates9 = state.appStates) !== null && _state$appStates9 !== void 0 && _state$appStates9.startChatFailed) {
|
|
524
|
+
if (state !== null && state !== void 0 && (_state$appStates9 = state.appStates) !== null && _state$appStates9 !== void 0 && _state$appStates9.startChatFailed || (state === null || state === void 0 ? void 0 : (_state$appStates10 = state.appStates) === null || _state$appStates10 === void 0 ? void 0 : _state$appStates10.conversationState) === ConversationState.Postchat) {
|
|
525
525
|
endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, true, false, true, uwid.current);
|
|
526
526
|
return;
|
|
527
527
|
}
|
|
528
528
|
|
|
529
529
|
// Scenario -> Chat was InActive and closing the chat (Refresh scenario on post chat)
|
|
530
|
-
if ((state === null || state === void 0 ? void 0 : (_state$
|
|
531
|
-
endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter,
|
|
530
|
+
if ((state === null || state === void 0 ? void 0 : (_state$appStates11 = state.appStates) === null || _state$appStates11 === void 0 ? void 0 : _state$appStates11.conversationState) === ConversationState.InActive) {
|
|
531
|
+
endChat(props, chatSDK, state, dispatch, setAdapter, setWebChatStyles, adapter, false, false, true, uwid.current);
|
|
532
532
|
return;
|
|
533
533
|
}
|
|
534
534
|
if ((state === null || state === void 0 ? void 0 : (_state$appStates12 = state.appStates) === null || _state$appStates12 === void 0 ? void 0 : _state$appStates12.conversationEndedBy) === ConversationEndEntity.Agent || (state === null || state === void 0 ? void 0 : (_state$appStates13 = state.appStates) === null || _state$appStates13 === void 0 ? void 0 : _state$appStates13.conversationEndedBy) === ConversationEndEntity.Bot) {
|