feat(sync): Add MSC4354 sticky events

This commit is contained in:
Erwan Leboucher authored and Ellis Git committed 2026-08-02 17:28:00 +00:00
1 parent 7789399ba5
commit 43197f695c
25 files changed
+572 -18

No files matched your search

+11 -4
View File
@@ -21,12 +21,19 @@ use crate::Ruma;
/// Note: Unstable features are used while developing new features. Clients
/// should avoid using unstable features in their stable releases
pub(crate) async fn get_supported_versions_route(
State(services): State<crate::State>,
_body: Ruma<get_supported_versions::Request>,
) -> Result<get_supported_versions::Response> {
Ok(assign!(
get_supported_versions::Response::new(versions()),
{ unstable_features: unstable_features() }
))
let mut unstable_features = unstable_features();
if services.config.allow_sticky_events {
// sticky events (https://github.com/matrix-org/matrix-spec-proposals/pull/4354)
unstable_features.insert("org.matrix.msc4354".to_owned(), true);
}
Ok(assign!(get_supported_versions::Response::new(versions()), {
unstable_features
}))
}
/// # `GET /_continuwuity/server_version`