Commit Graph

1429 Commits

Author SHA1 Message Date
renovate[bot]
643d1e957d fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v26.03.19 (#6411)
* fix(deps): update dependency org.matrix.rustcomponents:sdk-android to v26.03.18

* Fix API breaks

* Add compatibility with rustls (#6367)

A new `rustls-platform-verifier-android` library has to be added to the project, it'll be called from Rust to get access to the certificates on Android.

Originally, this was supposed to be added as a local maven repo pointing to the rust crate that publishes the AAR, but that's just plain terrible (more details [here](https://github.com/rustls/rustls-platform-verifier#android).

Instead, what we can do is use a script that uses `cargo-download` to download the latest crate or a specified version, unzip it and add the `aar` file to the `:libraries:matrix:impl` module.

* Try fixing Sonar with local AAR files

* Remove `UserCertificatesProvider`: this is no longer needed after integrating rustls

* Added some docs for rustls and its `platform-verifier` library

* Upgrade SDK to `26.03.19`: this version contains a workaround that allows the app to use the same TLS verifier as before, fixing the Let's Encrypt issues we saw with some homeservers (like element.io)

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-03-20 16:20:37 +01:00
Benoit Marty
e5f50a901c Map ClientBuildException.WellKnownDeserializationException to AuthenticationException.InvalidServerName, so that the error displayed to the user is more explicit. Closes #6368 2026-03-17 18:05:23 +01:00
Andy Balaam
612b56f067 Call the new recoverAndFixBackup method to fix key storage if it's broken 2026-03-10 14:49:34 +00:00
Benoit Marty
0e670e4059 Fix API break. 2026-03-09 21:27:28 +01:00
Valere Fedronic
477c482810 Merge branch 'develop' into valere/rtc/voice_call 2026-03-09 17:18:55 +01:00
Benoit Marty
9d8aa82177 Merge pull request #6292 from element-hq/renovate/org.matrix.rustcomponents-sdk-android-26.x
Update dependency org.matrix.rustcomponents:sdk-android to v26.03.6
2026-03-06 16:38:30 +01:00
Jorge Martin Espinosa
ef9e2e3960 Fix read receipts not appearing in threaded timelines (#6297) 2026-03-06 15:13:13 +00:00
Benoit Marty
83bf9dfd0e Add missing case for LiveLocation sharing. 2026-03-06 14:45:52 +01:00
Valere
0e12f7f265 Merge branch 'develop' into valere/rtc/voice_call 2026-03-06 12:22:28 +01:00
Valere
ea12fe436b review: consistency use isAudioCall everywhere (instead of voiceOnly) 2026-03-06 12:19:05 +01:00
Valere
902b7937c3 fix tests 2026-03-05 12:14:42 +01:00
Benoit Marty
1682ae88e7 Rename our classes too. 2026-03-04 17:41:44 +01:00
Benoit Marty
576b8d8484 Fix API break. 2026-03-04 17:12:25 +01:00
Valere
04a9c677fb Merge branch 'develop' into valere/rtc/voice_call 2026-03-04 13:46:54 +01:00
Valere
a3dd2c78b3 Support incoming audio only calls 2026-03-04 08:56:33 +01:00
Jorge Martin Espinosa
721add707c Simplify push notification flow by using locally stored values for pending pushes (#6258)
* Create `PushRequest` in push history DB: this will be used to store requests for push notifications, either pending or completed ones.

* Rename `WorkManagerRequest` to `WorkManagerRequestBuilder`: make its `build` method return a list of `WorkManagerRequestWrapper`, which can be used to enqueue normal or unique workers.

* Rename `PerformDatabaseVacuumRequestBuilder` and adapt it to the new API.

* Adjust other components using `WorkManagerRequest`.

* Replace `SyncNotificationWorkManagerRequestBuilder` with `SyncPendingNotificationsRequestBuilder` and `FetchNotificationsWorker` with `FetchPendingNotificationsWorker`: this new pair of request builder and worker allow enqueuing requests for a session id and, once the worker runs, retrieve all the pending request data and use it to fetch the associated events. This simplifies quite a bit how this data had to be passed or grouped, since it's no longer necessary to do so

* Add new methods to `PushHistoryService` to modify the `PushDatabase`:

- insertOrUpdatePushRequest
- insertOrUpdatePushRequests
- getPendingPushRequests
- removeOldPushRequests

* Make `PushHandler` just handle incoming pushes: those will be inserted into the pending push request table in DB, then handled by the new worker. Once the process finished, a new `NotificationResultProcessor` will handle the results and what needs to be done with them (call ringing, displaying notifications, etc.)

* Add `requestType` optional parameter to `WorkManagerScheduler.cancel` so we can decide to only cancel some kinds of requests.

* Add migration to remove existing work manager requests for fetching notifications, since the previous worker class no longer exists.
2026-03-03 15:14:36 +00:00
Jorge Martin Espinosa
70d5e1868a Make 'room list catch-up' analytics transaction network aware (#6233)
* Make 'room list catch-up' analytics transaction network aware.
* Add `RoomListService.isInitialSyncDone`. Use this to simplify `DefaultAnalyticsRoomListStateWatcher`'s logic.
2026-03-03 13:16:58 +01:00
Benoit Marty
1f69958dab Merge pull request #6035 from element-hq/fix/remove-fragment-part-in-mxc-urls
Add `MediaSource.safeUrl` for removing invalid fragment part from URLs
2026-03-03 11:57:49 +01:00
Valere
ec420332c3 WIP: Support using Element Call for voice calls in DMs 2026-03-03 11:50:22 +01:00
Benoit Marty
6e72454c1c Fix API break. 2026-03-02 09:40:42 +01:00
Benoit Marty
286aa56145 Fix API break. 2026-03-02 09:18:43 +01:00
Benoit Marty
b3b22033aa Handle EventRedacted case. Fixes #5569 2026-03-02 09:15:53 +01:00
Jorge Martín
cdd850d4dd Apply suggestion:
- Added `MediaSource.safeUrl` property replacing `withCleanUrl` method.
- Made `url` private so it can't be used externally.
- Reverted code in `CoilMediaFetcher`
- Also add tests
2026-02-27 09:52:17 +01:00
Jorge Martín
7fe0cc4d45 Add MediaSource.withCleanUrl method that removes invalid fragment data from MXC urls
We've seen some MXC urls in the wild having some `mxc://foo/bar#auto` fragment suffix, which is invalid, but the URL before that fragment part is valid and can be displayed
2026-02-27 09:52:17 +01:00
renovate[bot]
89a6f5a7bf Update metro to v0.11.0 (#6245)
* Update metro to v0.11.0

* Fix `@AssistedInject` usages

Now the injected variables in the factories must match the names in the constructors

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-02-25 16:19:47 +01:00
Jorge Martin Espinosa
dc11430a73 Add some DB optimizations (#6249)
* Set a maximum journal size limit (WAL file size) of 25MB

The previous value was null, which meant unlimited growth. This can affect performance, since the WAL file performance as a cache will worsen the larger it is

* When scheduling the vacuum task, make sure the user has enough free disk storage, since vacuuming can duplicate the DB sizes in disk
2026-02-25 11:59:21 +00:00
Jorge Martin Espinosa
496595f20d Disable the cross-process lock in the SDK (#6231)
* Disable the cross-process lock in the SDK

We don't use multiple process as iOS does, so we don't need it. It should improve DB performance a bit and overall waste less resources.
2026-02-23 15:31:59 +00:00
renovate[bot]
1ce57d811e Update dependency org.matrix.rustcomponents:sdk-android to v26.02.19 (#6229)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.02.19

* Fix breaking API changes: added `isLowPriority` to `RoomInfo` and `RoomSummary`.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-02-20 09:01:07 +01:00
renovate[bot]
bc295b3c97 Update dependency org.matrix.rustcomponents:sdk-android to v26.2.16 (#6211)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.2.16

* Fix log rotation breaking changes. The new values match iOS (https://github.com/element-hq/element-x-ios/pull/5108/)

* Fix `aRustRoomInfo()` test fixture

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-02-17 10:42:31 +01:00
Jorge Martin Espinosa
f6b8c189e1 When a background SDK task fails, react in the client (#6166)
- For initialization issues or errors, we just print and report them.
- For panics (unrecoverable errors) we also crash the app.
2026-02-10 12:28:24 +01:00
Benoit Marty
c18ac905c8 QRCode login: treat not found error as expired error.
Reorder some when cases.
2026-02-09 15:14:18 +01:00
renovate[bot]
82dd9a3f77 Update dependency org.matrix.rustcomponents:sdk-android to v26.2.6 (#6144)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.2.5

* Fix breaking API changes:
- Add temporary imlementation for `RustClientSessionDelegate.onBackgroundTaskErrorReport`, logging unrecoverable errors in background tasks of the SDK.
- Change `TimelineEventTypeFilter` to `TimelineEventFilter`.
- Support new `LatestEventValue.RemoteInvite`.

* Update the Rust SDK to `26.2.6`

* Fix API changes: `TimelineFocus.PinnedEvents` no longer takes any arguments

* Fix test fixtures: `NotificationItem` has a `rawEvent` field now

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-02-06 12:40:03 +00:00
ganfra
d58f4a28f8 Merge pull request #6136 from element-hq/feature/fga/space_room_list_filter
Add Space Filters feature for Room List
2026-02-05 16:14:16 +01:00
Jorge Martin Espinosa
22e60bf3c6 When creating a DM, set room history visibility to invited (#6138) 2026-02-04 14:54:59 +00:00
Jorge Martin Espinosa
5175bacb5e Remove JoinRule.Private from the codebase (#6129)
It shouldn't be in use, since it was never properly defined:

- The `Private` values coming from the SDK are considered to be `Invite` instead.
- Remove any existing `JoinRule.Private` usages in our code.
2026-02-03 19:27:22 +01:00
ganfra
915aca9c1d Add room list filter combining based on space selection 2026-02-02 21:46:33 +01:00
ganfra
9d576394ac Spaces : expose new SpaceServiceFilter 2026-02-02 21:02:55 +01:00
ganfra
2132b65bf6 Spaces : some cleanup on SpaceService 2026-02-02 21:02:54 +01:00
Benoit Marty
53efcbe636 Merge pull request #6119 from element-hq/feature/bma/handleHttp429
Ensure http 429 are retried 3 times before failing.
2026-02-02 12:42:57 +01:00
ganfra
bb2e69c4ca Merge pull request #6117 from element-hq/feature/fga/room_list_filter_rust
Refactor room list filtering to use Rust SDK
2026-02-02 10:58:21 +01:00
Benoit Marty
9d8eec7ad1 Update comment 2026-02-02 10:45:39 +01:00
Benoit Marty
7d4243657c Ensure http 429 are retried 3 times before failing. 2026-01-30 15:43:00 +01:00
ganfra
9641d3ef4f Add tests and clean code after RoomList Filter rework 2026-01-30 15:33:51 +01:00
Jorge Martin Espinosa
63f24f0ae1 Add special flow for leaving a space as the last owner (#6112)
* When the user is in a v12 room, use different UI to select the last owner when leaving

- Add `LeaveSpaceRoom.areCreatorsPrivileged` to detect when this is happening.
- Import new strings.
- Build the new UI.
- Attach it to a change member roles screen navigation.

* Don't display the `isLastOwner` UI if the user is the only joined one in the room

* Rename `LeaveSpaceState.isLastOwner` to `.needsOwnerChange`. This way, it's easier to understand the difference with the passed `LeaveSpaceRoom.isLastOwner` value

* Add a test for the new check of user not being the last joined member

* Fix paddings in `LeaveSpaceView`

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-01-30 09:10:00 +00:00
ganfra
0824a3ab8b Refactor room list filtering to use Rust SDK 2026-01-29 22:08:12 +01:00
ganfra
48ec74c248 Clean up unused imports and improve code documentation 2026-01-27 18:43:38 +01:00
ganfra
1e25938ef7 Iterate on manage space rooms, but not happy with the reset method. 2026-01-27 18:43:38 +01:00
ganfra
33eb848c94 Add reset method to SpaceRoomList 2026-01-27 18:43:38 +01:00
renovate[bot]
692302df5c Update dependency org.matrix.rustcomponents:sdk-android to v26.1.27 (#6096)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.1.27

* Fix breaking API changes: `LeaveSpaceRoom.isLastAdmin` is now `LeaveSpaceRoom.isLastOwner`.

* Rename `isLastAdmin` to `isLastOwner` in our codebase too.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-01-27 15:02:55 +00:00
Jorge Martin Espinosa
0313fa56dd Create a new room in a space (#6061)
* Add `SpaceService.editableSpaces` and `SpaceService.addChildToSpace`

* Add `parentSpace` to `CreateRoomConfig`

* Allow setting a parent space to a room in `ConfigureRoomPresenter`, make sure the room is added to the parent space when creating it

* `ConfigureRoomPresenter`: Load the list of possible spaces a room can be added to

* Refactor `RoomVisibilityState` to internally use `JoinRuleItem`

This gets rid of `RoomAccess` and `RoomAccessItem`, and it will allow us to map the join rule items in a cleaner way to both join rules and the UI

* Implement the UI changes:

- Display the parent space.
- Allow selecting a new one.
- Import needed strings.

* Fix existing tests

* Add `@Immutable` annotation to `SpaceRoom`, since it was detected as unstable.

Maybe because of `RoomType`?

* Update screenshots

---------

Co-authored-by: ElementBot <android@element.io>
2026-01-26 18:23:02 +01:00