diff --git a/src/bot/orchestrator.ts b/src/bot/orchestrator.ts index b44cdd5..f2a1b43 100644 --- a/src/bot/orchestrator.ts +++ b/src/bot/orchestrator.ts @@ -1407,6 +1407,21 @@ export class BotOrchestrator { case 'toggleTranscript': await this._teamsActions.toggleTranscript(params.enable !== false); break; + case 'toggleChat': + if (this._chatProcedure) { + if (params.enable !== false) { + this._chatProcedure.setBotJoinedAt(Date.now()); + await this._chatProcedure.enableChatMonitoring(); + await this._chatProcedure.subscribeToChatMessages(); + this._logger.info('Chat monitoring enabled via command'); + } else { + await this._chatProcedure.unsubscribe(); + this._logger.info('Chat monitoring disabled via command'); + } + } else { + this._logger.warn('toggleChat: no chat procedure'); + } + break; case 'toggleMic': await this._teamsActions.toggleMic(params.enable !== false); break;