support wait hook for conf:participant-action hold (#851)

This commit is contained in:
Hoan Luu Huu
2024-08-08 18:42:11 +07:00
committed by GitHub
parent ed7e036890
commit 689e55bdf0

View File

@@ -493,7 +493,7 @@ class Conference extends Task {
}
async doConferenceParticipantAction(cs, opts) {
const {action, tag} = opts;
const {action, tag, wait_hook } = opts;
switch (action) {
case 'tag':
@@ -509,7 +509,10 @@ class Conference extends Task {
await this.clearCoachMode();
break;
case 'hold':
this.doConferenceHold(cs, {conf_hold_status: 'hold'});
this.doConferenceHold(cs, {
conf_hold_status: 'hold',
...(wait_hook && {wait_hook})
});
break;
case 'unhold':
this.doConferenceHold(cs, {conf_hold_status: 'unhold'});