From a18d55e9ab21d3d943b87ac339088f04160b9959 Mon Sep 17 00:00:00 2001 From: Dave Horton Date: Mon, 22 Apr 2024 12:46:34 -0400 Subject: [PATCH] minor fix for leaving coach mode in conferencing --- lib/tasks/conference.js | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/tasks/conference.js b/lib/tasks/conference.js index 42580f58..2877b147 100644 --- a/lib/tasks/conference.js +++ b/lib/tasks/conference.js @@ -787,13 +787,16 @@ class Conference extends Task { } async clearCoachMode() { + if (!this.memberId) return; try { if (this.coaching.length === 0) { this.logger.info('Conference:_clearCoachMode: no coaching mode to clear'); - return; } - this.logger.info(`Conference:_clearCoachMode: now sending my audio to all, including ${this.coaching}`); - await this.ep.api('conference', [this.confName, 'relate', this.memberId, this.coaching, 'clear']); + else { + const memberList = this.coaching.join(','); + this.logger.info(`Conference:_clearCoachMode: now sending my audio to all, including ${memberList}`); + await this.ep.api('conference', [this.confName, 'relate', this.memberId, memberList, 'clear']); + } this.speakOnlyTo = null; this.coaching = []; } catch (err) {