minor fix for leaving coach mode in conferencing

This commit is contained in:
Dave Horton
2024-04-22 12:46:34 -04:00
parent d474b9d604
commit a18d55e9ab

View File

@@ -787,13 +787,16 @@ class Conference extends Task {
} }
async clearCoachMode() { async clearCoachMode() {
if (!this.memberId) return;
try { try {
if (this.coaching.length === 0) { if (this.coaching.length === 0) {
this.logger.info('Conference:_clearCoachMode: no coaching mode to clear'); 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}`); else {
await this.ep.api('conference', [this.confName, 'relate', this.memberId, this.coaching, 'clear']); 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.speakOnlyTo = null;
this.coaching = []; this.coaching = [];
} catch (err) { } catch (err) {