Skip to content

Commit b4afb91

Browse files
Velin92stefanceriu
authored andcommitted
feat(bindings): check if report room api is supported
1 parent d800d3c commit b4afb91

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

bindings/matrix-sdk-ffi/src/client.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1202,6 +1202,11 @@ impl Client {
12021202

12031203
Ok(closure().await?)
12041204
}
1205+
1206+
/// Checks if the server supports the report room API.
1207+
pub async fn is_report_room_api_supported(&self) -> Result<bool, ClientError> {
1208+
Ok(self.inner.server_versions().await?.contains(&ruma::api::MatrixVersion::V1_13))
1209+
}
12051210
}
12061211

12071212
#[matrix_sdk_ffi_macros::export(callback_interface)]

0 commit comments

Comments
 (0)