Skip to content

Commit aa5baf9

Browse files
committed
chore: Bump ruma
1 parent 5c00e6f commit aa5baf9

File tree

5 files changed

+43
-13
lines changed

5 files changed

+43
-13
lines changed

Cargo.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ regex = { version = "1.12.2", default-features = false }
7272
reqwest = { version = "0.13.1", default-features = false }
7373
ring = { version = "0.17.14", default-features = false }
7474
rmp-serde = { version = "1.3.0", default-features = false }
75-
ruma = { git = "https://github.com/ruma/ruma", rev = "03ca65151f40304e044f89d8e9e18b68cb9e4f29", features = [
75+
ruma = { git = "https://github.com/ruma/ruma", rev = "7f461cb0115aeeb98c2167363759ef99d1a565ee", features = [
7676
"client-api-c",
7777
"compat-unset-avatar",
7878
"compat-upload-signatures",

crates/matrix-sdk/src/authentication/oauth/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,7 @@ impl OAuth {
382382
use ruma::api::client::rendezvous::discover_rendezvous;
383383

384384
match self.client.send(discover_rendezvous::unstable::Request::new()).await {
385-
Ok(_) => Ok(true),
385+
Ok(response) => Ok(response.create_available),
386386
Err(e) => {
387387
if e.as_client_api_error().is_some_and(|err| {
388388
matches!(err.status_code, StatusCode::NOT_FOUND | StatusCode::FORBIDDEN)

crates/matrix-sdk/src/authentication/oauth/qrcode/mod.rs

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,7 @@ pub enum CheckCodeSenderError {
412412
#[cfg(test)]
413413
mod tests {
414414
use matrix_sdk_test::async_test;
415+
use serde_json::json;
415416
use wiremock::{
416417
Mock, ResponseTemplate,
417418
matchers::{method, path},
@@ -432,7 +433,9 @@ mod tests {
432433
.register_as_scoped(
433434
Mock::given(method("GET"))
434435
.and(path(URL))
435-
.respond_with(ResponseTemplate::new(200))
436+
.respond_with(ResponseTemplate::new(200).set_body_json(json!({
437+
"create_available": true,
438+
})))
436439
.expect(1),
437440
)
438441
.await;
@@ -446,6 +449,31 @@ mod tests {
446449
assert!(supported, "The rendezvous server should be supported");
447450
}
448451

452+
{
453+
let _discover_guard = server
454+
.server()
455+
.register_as_scoped(
456+
Mock::given(method("GET"))
457+
.and(path(URL))
458+
.respond_with(ResponseTemplate::new(200).set_body_json(json!({
459+
"create_available": false,
460+
})))
461+
.expect(1),
462+
)
463+
.await;
464+
465+
let supported = client
466+
.oauth()
467+
.msc_4388_rendezvous_server_supported()
468+
.await
469+
.expect("We should be able to check if the rendezvous server is supported");
470+
471+
assert!(
472+
!supported,
473+
"The rendezvous server should not be supported, because create_available is false"
474+
);
475+
}
476+
449477
{
450478
let _discover_guard = server
451479
.server()

crates/matrix-sdk/src/authentication/oauth/qrcode/secure_channel/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,9 @@ pub(super) mod test {
589589
.register_as_scoped(
590590
Mock::given(method("GET"))
591591
.and(path("/_matrix/client/unstable/io.element.msc4388/rendezvous"))
592-
.respond_with(ResponseTemplate::new(200)),
592+
.respond_with(ResponseTemplate::new(200).set_body_json(json!({
593+
"create_available": true,
594+
}))),
593595
)
594596
.await;
595597

0 commit comments

Comments
 (0)