* Use `ClientSessionDelegate` to ensure tokens are always updated.
Refreshed tokens on client restoration might not have been stored to disk if the token refresh happened before `RustMatrixClient` was built and the `ClientDelegate` was set in it.
Using `ClientSessionDelegate` should ensure the tokens refreshed callback is called at any point in time.
* Improve how assigning the Client works, fix docs
* Fix review comments
* Introduce value class UniqueId.
* Allow reactions on non-sent Event, the SDK can now handle it.
Also the SDK will manage local echo for reactions.
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.41
* Fixes after SDK upgrade:
- Use `ClientBuilderSlidingSync` to set `SlidingSyncVersionBuilder` in `RustMatrixClientFactory`.
- `Room.toggleReaction(emoji: String, eventId: EventId)` is now `Room.toggleReaction(emoji: String, uniqueId: UniqueId)`, since reactions can now be applied to local echoes too in the SDK.
* Rename exception case
* Fix wrong error case being used in test
---------
Co-authored-by: Benoit Marty <benoit@matrix.org>
Co-authored-by: Benoit Marty <benoitm@matrix.org>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Rename `Mention` to `IntentionalMention` for clarity
Remove dead code, there is no intentional mention for Room or RoomAlias.
Rename `IntentionalMention.AtRoom` to `IntentionalMention.Room` to match Rust naming
* Cancel ringing call notification on call cancellation
* Improve implementation, add some comments to clarify how it works.
* Make sure the call timeout job is cancelled