Set Element Call "intents" when starting and answering DM calls. (#30730)
* Start to implement intents for DM calls. * Refactor and fix intent bugs * Do not default skipLobby in Element Web * Remove hacks * cleanup * Don't template skipLobby or returnToLobby but inject as required * Revert "Don't template skipLobby or returnToLobby but inject as required" This reverts commit 35569f35bb254462dd86c16438dab38188db6fbc. * lint * Fix test * lint * Use other intents * Ensure we test all intents * lint * cleanup * Fix room check * Update imports * update test * Fix RoomViewStore test
This commit is contained in:
@@ -44,6 +44,7 @@ import { CallStore } from "../../../src/stores/CallStore";
|
||||
import { MatrixClientPeg } from "../../../src/MatrixClientPeg";
|
||||
import MediaDeviceHandler, { MediaDeviceKindEnum } from "../../../src/MediaDeviceHandler";
|
||||
import { storeRoomAliasInCache } from "../../../src/RoomAliasCache.ts";
|
||||
import { type Call } from "../../../src/models/Call.ts";
|
||||
|
||||
jest.mock("../../../src/Modal");
|
||||
|
||||
@@ -361,8 +362,12 @@ describe("RoomViewStore", function () {
|
||||
});
|
||||
|
||||
it("when viewing a call without a broadcast, it should not raise an error", async () => {
|
||||
const call = { presented: false } as Call;
|
||||
const getCallSpy = jest.spyOn(CallStore.instance, "getCall").mockReturnValue(call);
|
||||
await setupAsyncStoreWithClient(CallStore.instance, MatrixClientPeg.safeGet());
|
||||
await viewCall();
|
||||
expect(getCallSpy).toHaveBeenCalledWith(roomId);
|
||||
expect(call.presented).toEqual(true);
|
||||
});
|
||||
|
||||
it("should display an error message when the room is unreachable via the roomId", async () => {
|
||||
|
||||
Reference in New Issue
Block a user