Commit Graph

1598 Commits

Author SHA1 Message Date
bxdxnn 2ff6a56e7d Use the new SDK thread info for redacted messages 2026-08-19 16:12:15 +00:00
Benoit Marty 378fbfa1d8 Merge pull request #7441 from hayaksi1/fix/5978-caption-markdown
Convert markdown to HTML when a caption is edited
2026-08-18 10:05:19 +02:00
Benoit Marty 25094cbd06 Merge pull request #7445 from hayaksi1/fix/2617-user-id-with-slash
Open the user profile of a user id that contains a slash
2026-08-18 10:04:27 +02:00
renovate[bot] e6e93c9bd0 Update dependency org.matrix.rustcomponents:sdk-android to v26.08.17 (#7460)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.08.17

* Fix API breaks:

- `ClientBuildException.WellKnownLookupDisabled` should be handled now.
- `Client.sendReply` returns a `Result<SendHandle>` now. We can ignore it like we do for `Client.send`.

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-08-17 21:06:28 +02:00
hayaksi1 c5a878249b Open the user profile of a user id that contains a slash
A slash is valid in the local part of a user id, but in a permalink it
also separates the identifier from an event id, so the SDK could not tell
the two apart and the link fell back to opening matrix.to in a browser.

Only a user id can start with an @, so recover it before handing the URI
to the SDK, and only when the identifier really contains a slash so every
other permalink keeps taking the same path.
2026-08-17 03:48:44 +03:00
hayaksi1 537842bb40 Convert markdown to HTML when a caption is edited
Adding or editing a media caption from the plain composer sent the
caption as text only: the composer has no HTML to pass, and the media
caption edit was built by hand with a null formatted body, so the
markdown was never rendered. Sending a caption with the same markdown
does render it, because the SDK builds the formatted body there.

Build the edit with the SDK's createCaptionEdit, which runs the caption
through the same markdown conversion the send path uses.
2026-08-17 03:40:11 +03:00
Jorge Martin Espinosa 22195a47f2 Move the custom tile server URL config to the Element wellknown content (#7416)
* Move the custom tile server URL config to the Element wellknown content

* Iteration: use whole `MapTilerConfig` in the remote config
2026-08-14 08:20:37 +02:00
Jorge Martín 913b566270 Add missing tests for RustTemporaryMatrixClient 2026-08-13 12:46:46 +02:00
Benoit Marty 90a2a258d1 Merge branch 'develop' into fix/5794-account-data-api 2026-08-11 14:03:39 +02:00
Jorge Martín 6c7f4d3b24 Add some missing tests to improve coverage 2026-08-11 13:18:49 +02:00
Jorge Martín e371b46c68 Rename GetUrlResolver to UrlContentFetcher and TemporaryMatrixClientFactory.createTemporaryMatrixClient to just create 2026-08-11 13:18:49 +02:00
Jorge Martín e24468c74f Fix and add tests 2026-08-11 13:18:49 +02:00
Jorge Martín ec0819ad07 Fixup geturlresolver matrix client 2026-08-11 13:18:49 +02:00
Jorge Martín 90d4fbe0bd Apply the GetUrlResolver pattern using unauthenticated matrix clients where possible 2026-08-11 13:18:49 +02:00
Jorge Martín 3f19100427 Add TemporaryMatrixClient interface
This is an abstraction over an actual unauthenticated `Client` from the SDK that implements `GetUrlResolver`, and is supposed to be short-lived.

With this, we can use the SDK network stack to perform arbitrary GET url operations.

The `AutoCloseable` implementation makes it easier to clean up any leftover local config after using this temporary client.
2026-08-11 13:18:49 +02:00
ganfra 0de78ed956 Merge branch 'develop' into feature/fga/user_status_last_pieces 2026-08-11 10:04:18 +02:00
hayaksi1 33bdf968c5 Expose global account data get and set on MatrixClient
MatrixClient had no way to read or write global account data although the
underlying client supports it.

Add getAccountData and setAccountData to the interface and implement them in
RustMatrixClient using the same withContext/runCatchingExceptions idiom as the
neighbouring methods. The content is the raw JSON string the SDK returns and
accepts: event types are open ended, so a typed wrapper belongs to whichever
caller needs one. Scope is limited to global account data; the room level
variant and the change notification APIs can follow when a feature needs them.
2026-08-09 15:10:00 +03:00
Benoit Marty 8f8c3af8c5 [LinkNewDevice] Log continuation / cancellation failure. 2026-08-07 16:42:49 +02:00
ganfra 06862ff3b2 Test synchronizes on profile persistence instead of advanceUntilIdle 2026-08-07 16:30:03 +02:00
ganfra 9b39843e69 Add withProfilesExtension override to FakeFfiSyncServiceBuilder 2026-08-07 14:22:52 +02:00
ganfra 8d2686d1a9 Merge branch 'develop' into feature/fga/user_status_last_pieces 2026-08-07 10:12:32 +02:00
ganfra 0e563332ce Clean up formatting/detekt 2026-08-06 17:28:10 +02:00
Benoit Marty 9c66cd331f [Link new device] Handle split steps in the SDK 2026-08-06 17:22:10 +02:00
Benoit Marty 670ddd35f4 Fix compilation warning 2026-08-06 15:10:25 +02:00
Benoit Marty 4dffd7ddef Move deviceId, gitBranch and gitSha to the developer screens. 2026-08-06 14:46:28 +02:00
ganfra c35a0a3864 Sync automatic call status with user status flag and server support 2026-08-06 11:09:49 +02:00
ganfra 863cece4fb Subscribe to own profile updates and gate on server support 2026-08-05 16:14:59 +02:00
ganfra 489ef4666a Map displayed status for room members and timeline events 2026-08-05 16:14:59 +02:00
ganfra ac6cacb415 Add MatrixClient.isUserStatusSupported 2026-08-05 16:14:59 +02:00
ganfra 38102747ad Wire user status through the Rust SDK and refresh profile after change
# Conflicts:
#	libraries/matrix/impl/src/main/kotlin/io/element/android/libraries/matrix/impl/RustMatrixClient.kt
2026-08-05 16:14:59 +02:00
Matthew Hodgson 0a577ffbb8 Render push notifications for live location share starts 2026-08-03 21:01:56 +02:00
hayyaksi e6d4472c0c Index messages locally in an encrypted on-device store so encrypted rooms can be searched at all (#7249)
* Add a message search abstraction over the Rust SDK's local index

Wraps the SDK's search service so the rest of the app never sees MatrixRustSDK
types, following the existing convention in libraries/matrix.

- MessageSearch, MessageSearchService, MessageSearchResult and
  MessageSearchPaginationState describe the surface in the api module.
- RustMessageSearch and RustMessageSearchService implement it, with
  MessageSearchResultMapper and MessageSearchResultsProcessor turning SDK results
  into Kotlin data classes.
- TantivyQueryEscaper escapes the query so a user typing ":)" or "AND" searches
  for that literal text rather than tripping the tantivy parser, and joins every
  word as a Must clause.
- Fakes and unit tests cover the mapping, the processor and the escaper, the last
  checked against a real tantivy 0.26.1 parser.

* Attach the encrypted search index behind a disabled feature flag

Gives the client an on-device tantivy index encrypted with the session's client
secret, so encrypted rooms can be searched at all.

- The index store is attached at ClientBuilder time via withSearchIndexStore, in
  a search-index directory alongside the session, keyed on the client secret. A
  session without one gets no index.
- MatrixClient exposes isMessageSearchAvailable so callers gate on the real
  indexing capability rather than on the raw flag, and getCacheSize() counts the
  index directory so it stays visible in the settings figures.
- FeatureFlags.MessageSearch (feature.message_search) is off by default and
  isFinished = false. It is read once at ClientBuilder time, so develop stays
  releasable and nothing reaches a user.

* Simplify search index wiring following review

Tie search availability to the MessageSearch feature flag alone and let
the index be created without a client secret, encrypting it only when
the session has one, matching the SDK's SQLite stores. Make
getBaseClientBuilder take the flag as a required parameter and return
ClientBuilder directly again, dropping the BaseClientBuilder wrapper
and the mid-restore snapshot parameter. Check the flag through
FeatureFlagService in RustMatrixAuthenticationService instead of
caching it in a field, and revert the extra matrix_sdk_search tracing
target, which belongs in the SDK's defaults.
2026-07-30 11:17:40 +02:00
Jorge Martin Espinosa 674354b1a6 Enforce HS disabling E2EE in DM creation too (Element Pro) (#7292)
This part was missing from the implementation of this Element Pro feature, which incorrectly only applied to rooms.
2026-07-29 09:17:41 +00:00
ganfra 8b970fb2f1 Fix license header on FakeFfiContinuationMessageSender 2026-07-29 01:21:05 +02:00
ganfra 3fc8972464 Fix unit test compilation for new continuationSender param on WaitingForAuth 2026-07-28 18:08:10 +02:00
ganfra bd4d0cb02b Fix compilation for QR login continuation error variants added in SDK 26.07.28 2026-07-28 16:44:07 +02:00
Jenna Vassar fe24aeb2ce Add a password strength estimator wrapping the SDK zxcvbn API (#7186)
* Add a password strength estimator wrapping the SDK zxcvbn API

* Add tests for the password strength estimator SDK mapping

---------

Co-authored-by: ElementBot <android@element.io>
2026-07-28 10:30:06 +00:00
ganfra 29d9e7c1ba Merge branch 'develop' into feature/valere/timeline_active_call_rendering
# Conflicts:
#	tests/uitests/src/test/snapshots/images/features.messages.impl.timeline.components.customreaction_EmojiItemWithPopup_Night_0_en.png
2026-07-23 16:24:11 +02:00
ganfra 907579d59f Merge pull request #7232 from element-hq/feature/fga/display_user_status
WIP : display user status
2026-07-23 15:10:19 +02:00
Valere f22e4b3314 Merge branch 'develop' into feature/valere/timeline_active_call_rendering 2026-07-23 13:40:38 +02:00
ganfra 2a86c69b9d Sync user status strings with Localazy and tidy formatting
# Conflicts:
#	libraries/ui-strings/src/main/res/values/temporary.xml
2026-07-22 17:28:29 +02:00
renovate[bot] f21eb287c7 Update dependency org.matrix.rustcomponents:sdk-android to v26.07.22 (#7258)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.07.22

* Fix test fixture for rust's `RoomHero`

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-07-22 15:27:37 +00:00
ganfra 06a903718b Display user status next to display names across rooms and profiles 2026-07-22 17:27:21 +02:00
Jorge Martin Espinosa 18034e02a2 Fix banned mime type errors in DefaultContentScannerService (#7255)
The content scanner allows disabling certain mime types for files in the set up HS, but it turns out for the scan operation instead of returning an `"is_valid": false` result in that case, it returns an error with a `MCS_MIME_TYPE_FORBIDDEN` reason. We need to handle that case as if it had returned the false `isValid` value.
2026-07-22 16:48:44 +02:00
Valere 8109290650 code review 2026-07-17 15:33:28 +02:00
Valere 3052316bf5 Merge branch 'develop' into feature/valere/timeline_active_call_rendering 2026-07-15 16:22:26 +02:00
renovate[bot] d732f043dc Update dependency org.matrix.rustcomponents:sdk-android to v26.07.15 (#7216)
* Update dependency org.matrix.rustcomponents:sdk-android to v26.07.15

* Fix API breaks: add `status` and `call` parameters to `aRustRoomMember` helper

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Jorge Martín <jorgem@element.io>
2026-07-15 15:38:20 +02:00
Valere 3af396c505 Merge branch 'develop' into feature/valere/timeline_active_call_rendering 2026-07-15 14:12:54 +02:00
Jorge Martín 09b7732c1b Fix API breaks:
- Add `Beacon` variants for `NotificationData`.
- Add `call` and `status` to `UserProfile`.
2026-07-14 15:45:26 +02:00
Valere e9b090a552 Merge branch 'develop' into feature/valere/timeline_active_call_rendering 2026-07-13 14:54:16 +02:00