matrix-org / matrix-org/matrix-rust-sdk
ffi: Return the state store directory name back after sanitizing
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.3k
- Forks
- 500
- Avg merge
- 1d 16h
- Merged PRs (30d)
- 106
Description
When the application creates a session, the SDK create asubfolder with a "sanitized" name:
The application needs to know the folder name for instance to compute its size, or to fully delete it on session log out.
Currently the app is computing it using a simple replacement ":" -> "_", but that may not be enough for some userIds.
So the SDK should provide the created folder name, and a solution could be to add a new Client.getFolderName API.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in bindings/matrix-sdk-ffi/src/client_builder.rs around the session directory creation at the linked line, and trace how the sanitized folder name is produced. The work is done when the FFI Client API returns the exact created folder name so applications can size or delete the session directory reliably.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100