mirror of
https://github.com/vector-im/element-call.git
synced 2024-11-15 00:04:59 +08:00
Properly handle multiple rooms
This commit is contained in:
parent
ade6c19eba
commit
e98abaff4d
@ -172,6 +172,10 @@ export class ConferenceCallManager extends EventEmitter {
|
||||
.forEach((member) => this._processMember(member.userId));
|
||||
|
||||
for (const { call, onHangup, onReplaced } of this.pendingCalls) {
|
||||
if (call.roomId !== roomId) {
|
||||
continue;
|
||||
}
|
||||
|
||||
call.removeListener("hangup", onHangup);
|
||||
call.removeListener("replaced", onReplaced);
|
||||
const userId = call.opponentMember.userId;
|
||||
@ -237,6 +241,10 @@ export class ConferenceCallManager extends EventEmitter {
|
||||
};
|
||||
|
||||
_onMemberChanged = (_event, _state, member) => {
|
||||
if (member.roomId !== this.roomId) {
|
||||
return;
|
||||
}
|
||||
|
||||
this._processMember(member.userId);
|
||||
};
|
||||
|
||||
@ -320,6 +328,10 @@ export class ConferenceCallManager extends EventEmitter {
|
||||
return;
|
||||
}
|
||||
|
||||
if (call.roomId !== this.roomId) {
|
||||
return;
|
||||
}
|
||||
|
||||
const userId = call.opponentMember.userId;
|
||||
this._addCall(call, userId);
|
||||
this._setDebugState(userId, "answered");
|
||||
|
Loading…
Reference in New Issue
Block a user