You've already forked matrix-js-sdk
mirror of
https://github.com/matrix-org/matrix-js-sdk.git
synced 2025-08-09 10:22:46 +03:00
Add the call object to Call events
As explained in the comment. I've added it to the end so this should be completely backwards compatible (although it would be much nicer if it were the first arg, probably).
This commit is contained in:
@@ -792,7 +792,7 @@ describe("Group Call", function () {
|
||||
call.isLocalVideoMuted = jest.fn().mockReturnValue(true);
|
||||
call.setLocalVideoMuted = jest.fn();
|
||||
|
||||
call.emit(CallEvent.State, CallState.Connected);
|
||||
call.emit(CallEvent.State, CallState.Connected, CallState.InviteSent, call);
|
||||
|
||||
expect(call.setMicrophoneMuted).toHaveBeenCalledWith(false);
|
||||
expect(call.setLocalVideoMuted).toHaveBeenCalledWith(false);
|
||||
@@ -1080,7 +1080,7 @@ describe("Group Call", function () {
|
||||
});
|
||||
|
||||
it("handles regular case", () => {
|
||||
oldMockCall.emit(CallEvent.Replaced, newMockCall.typed());
|
||||
oldMockCall.emit(CallEvent.Replaced, newMockCall.typed(), oldMockCall.typed());
|
||||
|
||||
expect(oldMockCall.hangup).toHaveBeenCalled();
|
||||
expect(callChangedListener).toHaveBeenCalledWith(newCallsMap);
|
||||
@@ -1091,7 +1091,7 @@ describe("Group Call", function () {
|
||||
it("handles case where call is missing from the calls map", () => {
|
||||
// @ts-ignore
|
||||
groupCall.calls = new Map();
|
||||
oldMockCall.emit(CallEvent.Replaced, newMockCall.typed());
|
||||
oldMockCall.emit(CallEvent.Replaced, newMockCall.typed(), oldMockCall.typed());
|
||||
|
||||
expect(oldMockCall.hangup).toHaveBeenCalled();
|
||||
expect(callChangedListener).toHaveBeenCalledWith(newCallsMap);
|
||||
|
Reference in New Issue
Block a user