Skip to content

Rtc: Let the widget driver decide to fallback to well-known or not for rtc discovery. - #34581

Merged
toger5 merged 22 commits into
developfrom
valere/rtc/cache_dicovery
Aug 14, 2026
Merged

Rtc: Let the widget driver decide to fallback to well-known or not for rtc discovery.#34581
toger5 merged 22 commits into
developfrom
valere/rtc/cache_dicovery

Conversation

@BillCarsonFr

@BillCarsonFr BillCarsonFr commented Aug 5, 2026

Copy link
Copy Markdown
Member

Follow up of #34393
Depends on js-sdk matrix-org/matrix-js-sdk#5470

Element Call will stop doing any call to well-known. It always forward to the widget host using MSC4515.

Now the widget driver will decide to fallback to well-known based on the sdk config enable_client_well_known_lookups

CallStore is updated to use the new sdk api.

Checklist

@BillCarsonFr BillCarsonFr added the T-Task Tasks for the team like planning label Aug 5, 2026
Base automatically changed from valere/rtc/msc4515_widget_rtc_transport_discovery to develop August 10, 2026 14:12
@BillCarsonFr
BillCarsonFr marked this pull request as draft August 11, 2026 17:49
Comment thread apps/web/src/stores/CallStore.ts Outdated
Comment thread apps/web/src/stores/widgets/ElementWidgetDriver.ts Outdated
Comment thread apps/web/src/stores/widgets/ElementWidgetDriver.ts Outdated
Comment thread apps/web/test/unit-tests/stores/widgets/ElementWidgetDriver-test.ts Outdated
Comment thread apps/web/src/components/views/rooms/RoomHeader/RoomHeader.test.tsx Outdated

@robintown robintown left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've pushed fixes for my feedback directly due to Valere being away.

@Half-Shot Half-Shot left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me.

});
it("Blocks Element Call if transport foci are the wrong type", async () => {
client._unstable_getRTCTransports.mockResolvedValue([{ type: "anything-else" }]);
vi.mocked(client.cachedRtcTransports.get).mockReturnValue([{ type: "anything-else" }]);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noting we've changed this to prefill the cache rather than mocking the response, is that going to be more prone to breakage if the behaviour of _unstable_getRTCTransports changes?

if (foci !== undefined) {
if (Array.isArray(foci))
return foci; // Contents assumed to be valid Transports
else logger.warn(`org.matrix.msc4143.rtc_foci is not an array in .well-known`);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Surprised this passes linting, I thought we always used curly braces for else

@toger5

toger5 commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

I am merging this. @Half-Shot comments seem to be non blocking. Maybe @robintown or @BillCarsonFr with context might have a look and a potentially add a follow up PR.

@toger5
toger5 added this pull request to the merge queue Aug 14, 2026
Merged via the queue into develop with commit d732fa8 Aug 14, 2026
52 checks passed
@toger5
toger5 deleted the valere/rtc/cache_dicovery branch August 14, 2026 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

T-Task Tasks for the team like planning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants