update incoming call event handler

This commit is contained in:
Robert Long 2021-07-26 11:44:43 -07:00
parent e2b5d161cb
commit 0305fe7974

View File

@ -144,9 +144,6 @@ export class ConferenceCall extends EventEmitter {
return;
}
// HACK: Horrible hack necessary because callHandler sets opponentMember
// asynchronously before emitting the Call.incoming event.
const pollOpponentMember = () => {
if (call.opponentMember) {
const userId = call.opponentMember.userId;
this._addCall(call, userId);
@ -157,11 +154,6 @@ export class ConferenceCall extends EventEmitter {
call.answer();
return;
}
setTimeout(pollOpponentMember, 100);
};
pollOpponentMember();
};
_addCall(call, userId) {