matrix-org / matrix-rust-sdk

Matrix Client-Server SDK for Rust
Apache License 2.0
1.26k stars 252 forks source link

feat(ffi): add room alias format validation & room name to alias #4219

Closed jmartinesp closed 1 week ago

jmartinesp commented 1 week ago

Add two FFI functions:

is_room_alias_format_valid: to check if a passed string has a valid room alias format in Ruma. room_alias_from_room_display_name: to get a suggestion of a room alias to use given a room name.

Signed-off-by:

codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 69.23077% with 4 lines in your changes missing coverage. Please review.

Project coverage is 84.84%. Comparing base (933033c) to head (c19a12a). Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
crates/matrix-sdk-base/src/rooms/mod.rs 69.23% 4 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4219 +/- ## ========================================== - Coverage 84.85% 84.84% -0.01% ========================================== Files 272 272 Lines 29172 29185 +13 ========================================== + Hits 24753 24762 +9 - Misses 4419 4423 +4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

jmartinesp commented 1 week ago

I implemented all those suggestions and some changes to how the room name -> room alias transform works in the last commit.