Commit Graph

825 Commits

Author SHA1 Message Date
Benoit Marty b87bec6228 Account deactivation. 2024-09-17 16:51:11 +02:00
Benoit Marty 265c60a056 Fix test compilation issue. 2024-09-17 11:01:28 +02:00
Benoit Marty 3a0e182ba9 Use new API awaitRoomRemoteEcho to ensure that the room is ready SDK side. 2024-09-17 10:59:26 +02:00
Benoit Marty beb0bff3cc Use new API awaitRoomRemoteEcho to wait for the created room to be available. 2024-09-17 10:21:27 +02:00
Benoit Marty cf2c90ea0a Merge pull request #3467 from element-hq/feature/bma/accountCreation
Temporary account creation using Element Web.
2024-09-16 16:52:26 +02:00
ganfra 47d0c505b5 Merge pull request #3461 from element-hq/feature/fga/send_failure_identity_changes
Require acknowledgement to send to a verified user if their identity changed or if a device is unverified.
2024-09-16 16:00:18 +02:00
Jorge Martin Espinosa 7238af7f7f Fix not being able to decline an invite from the room list (#3466)
* Add `InvitedRoom` to wrap Rust SDK Rooms in 'invited' membership state.

At the moment, this is a wrapper that allows us to call `Room.leave()` without having to initialise the room's timeline (which is impossible).

* Add `MatrixRoom.getInvitedRoom(roomId)` to get one of these rooms.

Also, `RustRoomFactory` now has a `createInvitedRoom` method for this.

* Adapt `AcceptDeclineInvitePresenter` to use the new APIs.
2024-09-16 13:02:20 +00:00
Benoit Marty 39348d2e7e Account Creation using a WebView 2024-09-16 12:24:47 +02:00
Jorge Martin Espinosa 663362ac7f Add forced logout flow when the proxy is no longer available (#3458)
* Add `MatrixClient.isSlidingSyncProxySupported` function

* Update localazy strings

* Modify `ErrorDialog` to have an `onSubmit` call, which will be used for the submit action.

Also make the title text optional and dismissing the dialog by tapping outside/going back configurable.

* Check if a forced migration to SSS is needed because the proxy is no longer available.

In that case, display the non-dismissable dialog and force the user to log out after enabling SSS.

* Enable native/simplified sliding sync by default.

* Refactor the login to make sure we:

1. Always try native/simplified sliding sync login first, if available.
2. Then, if it wasn't available or failed with an sliding sync not supported error, try with the proxy instead (either discovered proxy or forced custom one).

* Move logic to `LoggedInPresenter` and the UI to `LoggedInView`

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-09-16 09:13:02 +00:00
ganfra b245c69322 Send failure verified user : set the room key recipient strategy 2024-09-13 16:41:44 +02:00
ganfra ff368b4072 Send failure verified user : resolve ui and logic 2024-09-13 16:40:07 +02:00
ganfra 416810acca Send state : introduce Failed.VerifiedUser interface. 2024-09-13 16:40:06 +02:00
ganfra de933b1f34 Send failure verified user : expose new methods on MatrixRoom. 2024-09-13 16:40:06 +02:00
ganfra d22d9f0bd2 Send failure verified user : set the room key recipient strategy 2024-09-13 16:40:06 +02:00
ganfra da3f5e00dc Merge pull request #3451 from element-hq/feature/valere/invisible_crypto_feature_flag
Feature/valere/invisible crypto feature flag
2024-09-12 16:29:21 +02:00
Benoit Marty e4d1428bed Rename isInit to isTimelineInitialized for clarity. 2024-09-12 16:27:52 +02:00
Valere bb50d3eb96 crypto: Add configuration flag to enable invisible crypto 2024-09-12 14:53:59 +02:00
Benoit Marty fac919e933 Remove process extension and provide isInit parameter to the processors. 2024-09-12 09:21:53 +02:00
Benoit Marty f87422a022 Fix filtering of Event at the beginning of DM. 2024-09-12 09:21:53 +02:00
Benoit Marty 90e51dc9fa Fix detekt false positive. 2024-09-11 20:41:58 +02:00
Benoit Marty 31bcd506e0 Fix API break 2024-09-11 20:10:48 +02:00
Benoit Marty 5a8658253a Merge pull request #3442 from element-hq/feature/bma/deviceId
DeviceId and cleanup.
2024-09-11 11:01:31 +02:00
Benoit Marty 6d12ff09b8 RustMatrixRoom do not need the SessionData anymore. 2024-09-11 10:03:22 +02:00
Benoit Marty 88b0eff0fe Introduce value class "DeviceId" 2024-09-11 09:52:25 +02:00
Jorge Martin Espinosa 67e262fdc8 Add banner for optional migration to simplified sliding sync (#3429)
* Add banner for optional migration to native sliding sync

- Add `MatrixClient.isNativeSlidingSyncSupported()` and `MatrixClient.isUsingNativeSlidingSync` to check whether the home server supports native sliding sync and we're already using it.
- Add `NativeSlidingSyncMigrationBanner` composable to the `RoomList` screen when the home server supports native sliding sync but the current session is not using it.
- Add an extra logout successful action to the logout flow, create `EnableNativeSlidingSyncUseCase` so it can be used there.

* Update screenshots

* Make sure the sliding sync migration banner has lower priority than the encryption setup ones

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-09-09 18:13:19 +02:00
ganfra b9a581953c Merge branch 'develop' into feature/fga/timeline_utd 2024-09-09 15:40:26 +02:00
ganfra 74c02cc2d3 Timeline : remove the encrypted history banner for now. 2024-09-09 11:20:50 +02:00
ganfra a7ab8ee843 Self verification : makes sure cancellation works properly 2024-09-09 10:30:35 +02:00
ganfra fbce600f2b Self verification : makes sure only one controller is created 2024-09-09 10:30:17 +02:00
Jorge Martin Espinosa 8c015da590 Wait for a room with joined state in /sync after creating it (#3421) 2024-09-09 09:36:49 +02:00
Benoit Marty 6251cb9269 Merge pull request #3422 from element-hq/feature/bma/agpl
Change license to AGPL
2024-09-06 20:40:28 +02:00
Benoit Marty 375ac25d8d Migrate license to AGPL - XML files. 2024-09-06 17:43:35 +02:00
Benoit Marty f61df38e55 Migrate license to AGPL.
Run script `uv run license-editor --repository ../element-x-android`
2024-09-06 17:19:19 +02:00
Jorge Martin Espinosa 0ec19ec566 Fix new logins with Simplified SS using the proxy (#3417)
* Fix new logins with Simplified SS using the proxy

* Make sure `ClientBuilderSlidingSync.Restored` is always used for restored sessions
2024-09-06 15:09:36 +00:00
ganfra b802a196fc Merge pull request #3392 from element-hq/feature/fga/pinned_messages_list
[Feature] Pinned messages list
2024-09-06 16:32:44 +02:00
ganfra d3420da599 Pinned messages list : improve and fix code after PR review. 2024-09-05 17:40:50 +02:00
ganfra 91a44f6380 Rust sdk : update to 0.2.42 2024-09-04 16:37:46 +02:00
ganfra 12e7e05551 Merge branch 'develop' into feature/fga/pinned_messages_list 2024-09-04 14:11:53 +02:00
ganfra 51f7599c38 Pinned messages list : fix all tests after changes 2024-09-04 12:09:17 +02:00
Jorge Martin Espinosa 2c8b0d0b95 Make sure to save the tokens the Client might return when its session is restored (#3378)
* 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
2024-09-04 10:54:31 +02:00
renovate[bot] 9fb82a1e86 Update dependency org.matrix.rustcomponents:sdk-android to v0.2.41 (#3384)
* 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>
2024-09-03 20:09:33 +02:00
Jorge Martin Espinosa 5920fd3f45 Make pinned events required state in SlidingSync (#3385)
This is needed to always have the pinned events of a room as soon as we open it.
2024-09-03 17:44:48 +02:00
Benoit Marty f03bd282e7 Change the way we do not delete the crypto database. 2024-09-02 11:29:44 +02:00
Benoit Marty 8b65cf2f4b Introduce SessionPathsFactory. 2024-08-30 18:42:00 +02:00
Benoit Marty c41cb33410 Provide distinct cache directory to the Rust SDK. 2024-08-30 18:36:20 +02:00
Benoit Marty d80f70fd32 Merge pull request #3320 from element-hq/feature/bma/cleanNotificationOfRedactedEvent
Redact message on displayed notification
2024-08-29 14:46:13 +02:00
Benoit Marty bc5ab0759c Use let. 2024-08-29 11:07:43 +02:00
Benoit Marty dfaa350167 Better handling on null reset handler.
This is not an error, but in this case, the reset identity is successful.
2024-08-29 09:41:13 +02:00
ganfra 741c3679ea Timeline : add a mode to differentiate between live/focused/pinned 2024-08-28 12:35:21 +02:00
Benoit Marty d867a5fe6f Cleanup notification for redacted event. 2024-08-28 10:29:01 +02:00