#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) { async enableBotMode(gather, autoEnable) {
try { try {
if (this.backgroundGatherTask) { if (this.backgroundGatherTask) {
this.logger.info('CallSession:enableBotMode - bot mode currently enabled, stop it'); this.logger.info('CallSession:enableBotMode - bot mode currently enabled, ignoring request to start again');
this.disableBotMode(); return;
} }
const t = normalizeJambones(this.logger, [gather]); const t = normalizeJambones(this.logger, [gather]);
this.backgroundGatherTask = makeTask(this.logger, t[0]); this.backgroundGatherTask = makeTask(this.logger, t[0]);