Commit Graph

460 Commits

Author SHA1 Message Date
Benoit Marty 97f0b65c03 Change type of items in activeRoomCallParticipants from String to UserId 2024-09-18 17:16:06 +02:00
Benoit Marty 7903223585 Change type of items in alternativeAliases from String to RoomAlias 2024-09-18 17:16:06 +02:00
Benoit Marty b87bec6228 Account deactivation. 2024-09-17 16:51:11 +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 ff368b4072 Send failure verified user : resolve ui and logic 2024-09-13 16:40:07 +02:00
ganfra de933b1f34 Send failure verified user : expose new methods on MatrixRoom. 2024-09-13 16:40:06 +02:00
Benoit Marty f87422a022 Fix filtering of Event at the beginning of DM. 2024-09-12 09:21:53 +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 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
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 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
Benoit Marty d867a5fe6f Cleanup notification for redacted event. 2024-08-28 10:29:01 +02:00
Benoit Marty 6309137a53 Reorder imports 2024-08-21 17:27:55 +02:00
Benoit Marty 57d927e9aa Suggestion for room alias.
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
2024-08-21 15:32:05 +02:00
Benoit Marty 6b528596ed Merge pull request #3307 from element-hq/feature/bma/cleanup
Cleanup and add unit test for DefaultPinnedMessagesBannerFormatter
2024-08-20 09:10:31 +02:00
Benoit Marty 21f2c5a231 Merge pull request #3240 from element-hq/feature/valere/message_shields
Timeline UI | MessageShield Support
2024-08-16 14:25:33 +02:00
Benoit Marty 70558aa381 Move editMessageLambda to the constructor. 2024-08-16 11:58:17 +02:00
Jorge Martín 8a1e333aa7 Fix most review comments 2024-08-14 16:53:50 +02:00
Benoit Marty 5d10b1fe85 Merge branch 'develop' into feature/valere/message_shields 2024-08-14 12:37:31 +02:00
Jorge Martín 7fd0ad09dc Improve APIs, add tests 2024-08-13 08:55:06 +02:00
Jorge Martín 175bada0df Improve existing APIs 2024-08-13 08:55:06 +02:00
Jorge Martín ee7a31cace Extract OIDC to its own module 2024-08-13 08:55:05 +02:00
ganfra 229c02e895 Merge branch 'develop' into feature/fga/pinned_message_banner_logic 2024-08-05 20:46:24 +02:00
ganfra 34fd21f440 Pinned events : introduce pinnedEventsTimeline method. 2024-08-01 18:22:22 +02:00
ganfra 0b32dbebb5 tests : refactor some classes 2024-07-31 21:14:29 +02:00
ganfra 46f5115c0a Pinned events : clean up code 2024-07-30 16:40:18 +02:00
ganfra 66e06d7d1c Pinned event : add some tests 2024-07-30 16:38:11 +02:00
ganfra 52a643f116 Pin : expose the new rust sdk apis 2024-07-29 12:50:35 +02:00
ganfra 0149007dd4 Timeline Action : refactor how it's computed and align with iOS 2024-07-26 18:20:03 +02:00
Valere b3b90a3b17 MessageShields | Fix test compilation 2024-07-25 10:01:28 +02:00
ganfra d421a6c99b Merge branch 'develop' into feature/fga/room_preview_join_button_fallback 2024-07-24 16:34:35 +02:00
ganfra a23e5e2400 Edit : fallback to room.edit when timeline item is not found. 2024-07-24 11:49:16 +02:00
ganfra aebcc52309 Join Room : makes sure we can join by alias 2024-07-23 21:17:35 +02:00
Benoit Marty 5bda29ca7e Rework FakeMatrixRoom so that it contains only lambdas. (#3229)
* Upgrade lint to 8.7.0-alpha01

* FakeMatrixRoom: lambda everywhere

Fix test compilation issues
2024-07-22 10:39:48 +02:00
Jorge Martin Espinosa 344e07bc0b Cancel ringing call notification on call cancellation (#3047)
* 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
2024-07-19 17:51:44 +02:00
renovate[bot] 05e56e1ebc Update dependency org.matrix.rustcomponents:sdk-android to v0.2.33 (#3220)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.33

* Fix API breaks

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2024-07-19 13:33:27 +02:00
Benoit Marty 85ceb0296c When user manually mark a room as read, also dismiss the notifications for this room. 2024-07-16 13:10:30 +02:00
Jorge Martin Espinosa 2ff5fa67fc Restore intentional mentions in the markdown/plain text editor (#3193)
* Restore intentional mentions in the markdown/plain text editor

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-07-15 18:27:59 +02:00
Jorge Martin Espinosa 5944f112fb Subscribe to RoomListItems in the visible range (#3169)
* Subscribe to `RoomListItems` in the visible range

This ensures the room list items always have updated info.
2024-07-11 10:54:56 +02:00
Jorge Martin Espinosa 0be7058416 Unify the way we decide whether a room is a DM or a group room (#3100)
* Add centralised 'room is DM' check

Also add extension functions for `MatrixRoom` and `MatrixRoomInfo`.

* Use the centralised method and extension functions through the app, including:

- Room list.
- Room details screen.
- Invites.
- Notifications.

Replace most `isDirect` usages with `isDm`.

* Update screenshots

---------

Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-07-10 16:28:46 +00:00
renovate[bot] 68efc918ba Update dependency org.matrix.rustcomponents:sdk-android to v0.2.31 (#3145)
* Update dependency org.matrix.rustcomponents:sdk-android to v0.2.31

* Use new Rust client side sorting API

* Make `RoomListEntriesUpdate.describe()` an extension function

* Remove `RoomListSummary.Filled` and `RoomListSummary.Empty`

* Fix icon sizes to pass the lint checks

* Update screenshots

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
Co-authored-by: ElementBot <benoitm+elementbot@element.io>
2024-07-05 15:25:42 +00:00
Benoit Marty 8ec283f2ca Use SDK to get Element Wellknown content. 2024-07-02 13:28:26 +02:00
Benoit Marty 6531a39b5a Introduce UserServerResolver. 2024-07-02 10:22:56 +02:00