Make CallHandler emit CallChangeRoom

Let's hope I changed the tests correctly

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
This commit is contained in:
Šimon Brandner 2021-04-28 11:49:07 +02:00
parent e5b61f0632
commit 40748d3c94
No known key found for this signature in database
GPG key ID: 9760693FDD98A790
4 changed files with 22 additions and 24 deletions

View file

@ -141,6 +141,7 @@ export enum PlaceCallType {
export enum CallHandlerEvent {
CallsChanged = "calls_changed",
CallChangeRoom = "call_change_room",
}
export default class CallHandler extends EventEmitter {
@ -537,10 +538,7 @@ export default class CallHandler extends EventEmitter {
this.removeCallForRoom(mappedRoomId);
mappedRoomId = newMappedRoomId;
this.calls.set(mappedRoomId, call);
dis.dispatch({
action: Action.CallChangeRoom,
call,
});
this.emit(CallHandlerEvent.CallChangeRoom, call);
}
}
});