Since #5618 building a SyncService might fail to build because a /versions requests fails.
The builder attempts to check if support for MSC4306 is enabled on the homeserver.
|
if client.enabled_thread_subscriptions() { |
|
let server_features = client |
|
.supported_versions() |
|
.await |
|
.map_err(|err| Error::SlidingSync(err.into()))? |
|
.features; |
|
|
|
if !server_features.contains(&FeatureFlag::from("org.matrix.msc4306")) { |
|
warn!( |
|
"Thread subscriptions extension is requested on the client, but the server doesn't advertise support for it: not enabling." |
|
); |
|
} else { |
|
debug!("Enabling the thread subscriptions extension"); |
|
builder = builder.with_thread_subscriptions_extension( |
|
assign!(http::request::ThreadSubscriptions::default(), { |
|
enabled: Some(true), |
|
limit: Some(ruma::uint!(10)) |
|
}), |
|
); |
|
} |
|
} |
Critically, /versions nowadays can also fail due to token expiration, for more info see #5816 and #5822. This combination means that building a SyncService can simply fail due to a network request failing. Just enabling token refresh on the /versions request results in a deadlock: #5825.
Two things that would be nice to achieve:
- Remove the possibility of a network failure to fail the
SyncService builder.
- Allow token refres for the
/versions request.
Since #5618 building a
SyncServicemight fail to build because a/versionsrequests fails.The builder attempts to check if support for MSC4306 is enabled on the homeserver.
matrix-rust-sdk/crates/matrix-sdk-ui/src/room_list_service/mod.rs
Lines 160 to 180 in f9584f5
Critically,
/versionsnowadays can also fail due to token expiration, for more info see #5816 and #5822. This combination means that building aSyncServicecan simply fail due to a network request failing. Just enabling token refresh on the/versionsrequest results in a deadlock: #5825.Two things that would be nice to achieve:
SyncServicebuilder./versionsrequest.