matrix-rust-sdk
matrix-rust-sdk copied to clipboard
Allow `restore_session` without `SessionMeta`
It is possible and desirable to be able to restore a session with having SessionMeta
cached by the client, but instead discovering it via whoami
during the session restoration. Implementing this seems fairly easy, but what API should be created for this is not clear to me. MatrixSession
could be modified to make meta
optional, but I'm not sure this makes sense for other places MatrixSession
is used.
Here are some options I've though of:
- Make
meta
inMatrixSession
an option - Create a new type to replace
MatrixSession
forrestore_session
- Create a new method on
Client
for this use case
Additionally, what should the client do if whoami
does not return a device id?
I'd like feedback on how to implement this please.