|
|
@@ -121,17 +121,17 @@ module.exports = (crowi) => {
|
|
|
|
|
|
// retrieve settings
|
|
|
const settings = {};
|
|
|
- if (currentBotType === 'customBotWithoutProxy') {
|
|
|
+ if (currentBotType === null) {
|
|
|
settings.slackSigningSecretEnvVars = configManager.getConfigFromEnvVars('crowi', 'slackbot:signingSecret');
|
|
|
settings.slackBotTokenEnvVars = configManager.getConfigFromEnvVars('crowi', 'slackbot:token');
|
|
|
- settings.slackSigningSecret = configManager.getConfig('crowi', 'slackbot:signingSecret');
|
|
|
- settings.slackBotToken = configManager.getConfig('crowi', 'slackbot:token');
|
|
|
+ settings.slackSigningSecret = null;
|
|
|
+ settings.slackBotToken = null;
|
|
|
}
|
|
|
- else if (currentBotType === null) {
|
|
|
+ else if (currentBotType === 'customBotWithoutProxy') {
|
|
|
settings.slackSigningSecretEnvVars = configManager.getConfigFromEnvVars('crowi', 'slackbot:signingSecret');
|
|
|
settings.slackBotTokenEnvVars = configManager.getConfigFromEnvVars('crowi', 'slackbot:token');
|
|
|
- settings.slackSigningSecret = null;
|
|
|
- settings.slackBotToken = null;
|
|
|
+ settings.slackSigningSecret = configManager.getConfig('crowi', 'slackbot:signingSecret');
|
|
|
+ settings.slackBotToken = configManager.getConfig('crowi', 'slackbot:token');
|
|
|
}
|
|
|
else {
|
|
|
// settings.proxyUriEnvVars = ;
|
|
|
@@ -144,17 +144,16 @@ module.exports = (crowi) => {
|
|
|
|
|
|
// retrieve connection statuses
|
|
|
let connectionStatuses;
|
|
|
- if (currentBotType === 'customBotWithoutProxy') {
|
|
|
-
|
|
|
+ if (currentBotType === null) {
|
|
|
+ // TODO imple null action
|
|
|
+ }
|
|
|
+ else if (currentBotType === 'customBotWithoutProxy') {
|
|
|
const token = settings.slackBotToken;
|
|
|
// check the token is not null
|
|
|
if (token != null) {
|
|
|
connectionStatuses = await getConnectionStatuses([token]);
|
|
|
}
|
|
|
}
|
|
|
- else if (currentBotType === null) {
|
|
|
- console.log('currentBotType === null');
|
|
|
- }
|
|
|
else {
|
|
|
// TODO: retrieve tokenGtoPs from DB
|
|
|
const tokenGtoPs = ['gtop1'];
|