#206: ignore request to start bot mode when bot mode is already active

This commit is contained in:
Dave Horton
2023-01-04 07:37:07 -05:00
parent 4723de9b24
commit b600e90ffd

View File

@@ -450,8 +450,8 @@ class CallSession extends Emitter {
async enableBotMode(gather, autoEnable) {
try {
if (this.backgroundGatherTask) {
this.logger.info('CallSession:enableBotMode - bot mode currently enabled, stop it');
this.disableBotMode();
this.logger.info('CallSession:enableBotMode - bot mode currently enabled, ignoring request to start again');
return;
}
const t = normalizeJambones(this.logger, [gather]);
this.backgroundGatherTask = makeTask(this.logger, t[0]);