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 `Client::public_rooms` function #4187

Closed jmartinesp closed 2 weeks ago

jmartinesp commented 2 weeks ago

This is needed to get rooms from the public rooms directory. Also add ffi::PublicRoomsChunk structure to map the resulting data.

A customer couldn't find a way to use this feature in their fork because the method wasn't in the FFI layer, so I added it here.

Signed-off-by:

pixlwave commented 2 weeks ago

Shouldn't this be managed through the existing RoomDirectorySearch type, rather than exposing the raw API?

jmartinesp commented 2 weeks ago

Shouldn't this be managed through the existing RoomDirectorySearch type, rather than exposing the raw API?

Ah, I didn't realise this already existed since I couldn't find the raw API call being used in the project. Closing this, I'll modify the directory search API then (if possible).

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.88%. Comparing base (5158b39) to head (1d4202f).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #4187 +/- ## ========================================== + Coverage 84.87% 84.88% +0.01% ========================================== Files 271 271 Lines 29076 29076 ========================================== + Hits 24677 24682 +5 + Misses 4399 4394 -5 ```

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