add allowJoinUnmutedViaIntent to the bridge

This allows us to control to never start unmuted in spa but be able to
start unmuted in widget and component mode.
This commit is contained in:
Timo K.
2026-09-08 18:12:40 +02:00
parent 486ecbfda0
commit 273ee3b632
7 changed files with 79 additions and 23 deletions
+9
View File
@@ -252,6 +252,11 @@ describe("createWidgetHostBridge", () => {
expect(bridge.supportsProfileChanges).toBe(false);
});
test("allows joining unmuted on the intent, since the host asked for the call", () => {
const bridge = createWidgetHostBridge(mockWidget({}));
expect(bridge.allowJoinUnmutedViaIntent).toBe(true);
});
describe("supportsReactions", () => {
const capabilities = [
"org.matrix.msc2762.send.event:m.reaction",
@@ -294,4 +299,8 @@ describe("nullHostBridge", () => {
test("supports reactions, since nothing is mediating its homeserver access", () => {
expect(nullHostBridge.supportsReactions).toBe(true);
});
test("does not allow joining unmuted on the intent, since nobody vouched for it", () => {
expect(nullHostBridge.allowJoinUnmutedViaIntent).toBe(false);
});
});