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) {