Set auto on-a-call status (#34306)

* Support for reading m.call status

(well, the prefixed version)

* Abstract the details away in userStatusFromProfile

make the validate functions non-exported

* Write on on-=a-call status

* Add tests

* Move user call status logic to its own listener

* Move tests

* use vi rather than jest

* add more mocks

* call async
This commit is contained in:
David Baker
2026-07-21 14:58:00 +00:00
committed by GitHub
parent a509a32a5c
commit 8effa81ad8
10 changed files with 191 additions and 2 deletions
+1 -1
View File
@@ -135,7 +135,7 @@ export function useMockedCalls() {
* Enables the feature flags required for call tests.
*/
export function enableCalls(): { enabledSettings: Set<string> } {
const enabledSettings = new Set(["feature_video_rooms", "feature_element_call_video_rooms"]);
const enabledSettings = new Set(["feature_video_rooms", "feature_element_call_video_rooms", "feature_user_status"]);
jest.spyOn(SettingsStore, "getValue").mockImplementation((settingName): any => {
if (settingName.startsWith("feature_")) return enabledSettings.has(settingName);
if (settingName === "activeCallRoomIds") return [];
@@ -22,6 +22,7 @@ import {
describe("CallStore", () => {
let client: MockedObject<MatrixClient>;
let room: Room;
beforeEach(() => {
enableCalls();
const res = setUpClientRoomAndStores();