zahmis 5 лет назад
Родитель
Сommit
4eac72a087

+ 6 - 7
src/client/js/components/Admin/SlackIntegration/CustomBotWithoutProxySettingsAccordion.jsx

@@ -39,14 +39,13 @@ const CustomBotWithoutProxySettingsAccordion = ({
         currentBotType,
         currentBotType,
       });
       });
 
 
-      if (!isConnectedToSlack) {
-        return (
-          onSetIsRegisterSlackCredentials(false),
-          onSetIsSendTestMessage(false)
-        );
+      if (isConnectedToSlack) {
+        onSetIsRegisterSlackCredentials(true);
+      }
+      else {
+        onSetIsRegisterSlackCredentials(false);
+        onSetIsSendTestMessage(false);
       }
       }
-      onSetIsRegisterSlackCredentials(true);
-
       toastSuccess(t('toaster.update_successed', { target: t('admin:slack_integration.custom_bot_without_proxy_settings') }));
       toastSuccess(t('toaster.update_successed', { target: t('admin:slack_integration.custom_bot_without_proxy_settings') }));
     }
     }
     catch (err) {
     catch (err) {