Skip to content

feat(client): Support for RTC transports discovery#6789

Open
BillCarsonFr wants to merge 8 commits into
mainfrom
valere/rtc/msc4143_rtc_discovery
Open

feat(client): Support for RTC transports discovery#6789
BillCarsonFr wants to merge 8 commits into
mainfrom
valere/rtc/msc4143_rtc_discovery

Conversation

@BillCarsonFr

@BillCarsonFr BillCarsonFr commented Jul 23, 2026

Copy link
Copy Markdown
Member

RTC transport discovery has now a new authenticated end-point on the homeserver GET /_matrix/client/v1/rtc/transports

This PR add supports for that via a new client API Client::rtc_transports, it uses the existing cache mecanism used by similar APIs (well-known, supported_version). I used a similar pattern.

The old rtc_foci endpoint has been renamed to wellknown_rtc_transport and should only be used as fallback if new endpoint is not supported

  • I've documented the public API changes in the appropriate changelog files (see Writing changelog entries).
  • This PR was made with the help of AI.

Signed-off-by:

@codspeed-hq

codspeed-hq Bot commented Jul 23, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 50 untouched benchmarks


Comparing valere/rtc/msc4143_rtc_discovery (d3f4261) with main (c1db376)

Open in CodSpeed

@codecov

codecov Bot commented Jul 23, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 84.09091% with 21 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.01%. Comparing base (c1db376) to head (d3f4261).
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
crates/matrix-sdk/src/client/mod.rs 84.09% 17 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6789      +/-   ##
==========================================
- Coverage   90.02%   90.01%   -0.01%     
==========================================
  Files         405      405              
  Lines      113627   113746     +119     
  Branches   113627   113746     +119     
==========================================
+ Hits       102290   102386      +96     
- Misses       7463     7476      +13     
- Partials     3874     3884      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@BillCarsonFr
BillCarsonFr force-pushed the valere/rtc/msc4143_rtc_discovery branch from 810fa7b to 4845b3f Compare July 23, 2026 15:57
@BillCarsonFr
BillCarsonFr marked this pull request as ready for review July 23, 2026 16:22
@BillCarsonFr
BillCarsonFr requested a review from a team as a code owner July 23, 2026 16:22
@BillCarsonFr
BillCarsonFr requested review from jmartinesp and removed request for a team July 23, 2026 16:22

@jmartinesp jmartinesp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, just wondering if it's a good idea to rename the existing method if it's being deprecated anyway. I guess it'll mean a migration will be needed and it will force clients to notice the replacement.

@BillCarsonFr

Copy link
Copy Markdown
Member Author

LGTM, just wondering if it's a good idea to rename the existing method if it's being deprecated anyway. I guess it'll mean a migration will be needed and it will force clients to notice the replacement.

Maybe I can keep the old name like that?

#[deprecated = "Use `Client::rtc_transports` instead"]
pub async fn rtc_foci(&self) -> HttpResult<Vec<RtcTransport>> {
    self.well_known_rtc_transports()
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants