Commit Graph

34 Commits

Author SHA1 Message Date
Jorge Martin Espinosa 885e042c12 Initial content scanner integration (#7139)
* Create a `ContentScanner` component:

- Add `:features:contentscanner:api` module with the interface.
- Implement the concrete component using the Rust SDK in `:libraries:matrix:impl`.

This can be used to both set up the content scanner media fetching in the SDK Client and manually scanning media sources from the Android side

* Create `ContentScannerUrlProvider` in a new `:features:contentscaner:api` module as a noop implementation

Use it as a placeholder for the code to instantiate a `RustContentScanner` with the fetched URL and set it as part of the SDK client.

* Expose the optional `ContentScanner` in the `@SessionScope`

* Split the storage part of the Element well-known retriever so it can be reused for the non-session bound retriever.

Also add the new `content_scanner_url` field to it.

This will be used by the enterprise code to fetch the actual content scanner url.

* Bump enterprise commit to have access to the actual content scanner url provider implementation

* Fix tests and lint issues

* Use the right namespace for `:features:contentscanner:api`, also use the right namespace for `impl`

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
2026-07-08 07:50:22 +00:00
Jenna Vassar fdac92a9ea Rename the custom recovery passphrase well-known to match the merged schema
The merged element-enterprise#261 well-known schema advertises the feature
under custom_recovery_passphrase (no _settings/_requirements suffix), so the
parser previously looking for custom_recovery_passphrase_settings would never
activate the flow. Update the @SerialName and drop the narrow "Requirements"
suffix from the type — the block is now general, extensible feature settings —
to mirror the .pkl CustomRecoveryPassphrase class. Bumps the enterprise
submodule to the matching consumer change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 15:03:24 -07:00
Jenna Vassar a205d03b43 Floor the custom recovery passphrase minimum at 1 instead of ignoring the spec
When the homeserver advertises custom_recovery_passphrase_settings, always run
the custom passphrase flow, flooring min_character_count at 1 (covering missing,
zero, and negative values) so the derived passphrase can never be empty. Any
stronger minimum stays the operator's choice. Replaces the previous behaviour of
dropping the spec and falling back to the auto-generated key.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 14:42:38 -07:00
Jenna Vassar 2931418018 Parse custom_recovery_passphrase_settings from Element .well-known
Add CustomRecoveryPassphraseRequirements to ElementWellKnown and decode
the custom_recovery_passphrase_settings block (currently just
min_character_count) from the homeserver's element.json. Invalid specs
(missing or non-positive min_character_count) are logged and mapped to
null so the setup flow falls back to the generated-key path. Field names
match the ESS well-known schema (element-enterprise#261).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-02 13:33:18 -07:00
Benoit Marty 2f45ca8835 Merge pull request #6682 from element-hq/feature/bma/customMasScheme
Add a way to tweak MAS url.
2026-05-07 10:51:32 +02:00
Benoit Marty 61f074ddc1 Let our Json parser accept comments and trailing comma. 2026-05-04 10:05:11 +02:00
Benoit Marty 3dd2a60b3a Do not use generic Exception 2026-04-29 22:51:54 +02:00
Benoit Marty 8512279d96 Add a cache for Element .well-known file. 2026-04-29 22:29:41 +02:00
Benoit Marty c1e908a8e6 Fix tests. 2026-04-29 22:29:41 +02:00
Benoit Marty a76b55e580 Add a way to tweak MAS url. 2026-04-29 22:29:40 +02:00
Benoit Marty df4c719151 Let enterprise build be able to use a different notification channel for noisy notification. 2026-02-11 11:57:01 +01:00
Benoit Marty eb31505dc7 Copyright: Add Element Creations Ltd. copyright 2025-11-10 11:05:05 +01:00
Benoit Marty f86431e663 Copyright: Add final period 2025-11-10 10:13:41 +01:00
Benoit Marty c4e0370f41 Copyright: run command uv run license-editor --repository ../element-x-android 2025-11-10 10:09:26 +01:00
Jorge Martin Espinosa 7aa564e74d Use the SDK Client to check whether a homeserver is compatible (#5664)
* Use the SDK `Client` to check whether a HS is compatible

* Remove usage of unused `WellKnown`, keep `ElementWellKnown`

* Make `HomeServerLoginCompatibilityChecker.check` return `true/false` values to distinguish non-valid homeservers from a failed check

* Use `inMemoryStore` and `serverNameOrHomeserverUrl`

* Do some cleanup of `isValid` and `isWellknownValid`

* Make the debounce for starting the search a bit higher, as checking for the homeservers seems more resource-intensive now
2025-11-04 15:43:00 +01:00
Benoit Marty 76493f52ec Merge branch 'develop' into feature/bma/metro070 2025-10-23 11:30:25 +02:00
Benoit Marty 263e761907 Remove @Inject, not necessary anymore when class is annotated with @ContributesBinding 2025-10-22 18:52:37 +02:00
Benoit Marty 5b5c007cd2 Improve API of interface WellknownRetriever to be able to distinguish between 404 and other errors. 2025-10-22 15:28:31 +02:00
Benoit Marty b45fb2128b Improve API of interface WellknownRetriever to be able to distinguish between 404 and other errors. 2025-10-22 14:45:15 +02:00
Benoit Marty 38908a42a2 Update API around brandColor. 2025-10-20 16:33:46 +02:00
Benoit Marty df48ed5a2d Introduce JsonProvider.
It will ensure that classes are using the correct Json instances in the unit tests.
2025-10-20 09:40:42 +02:00
Benoit Marty 7c437761c4 Move Json provider from Network module to AppModule to reuse it. 2025-10-16 16:37:08 +02:00
Benoit Marty a575019760 Use DependencyHandlerScope.testCommonDependencies() 2025-09-16 14:38:31 +02:00
Jorge Martín 4ab62a6a38 Redo DI gradle setup code 2025-09-04 16:49:20 +02:00
Jorge Martín 29a97fc0d9 Fix lint issues and restore commented out code 2025-09-04 16:49:18 +02:00
Jorge Martín b76a71ebf5 Start migrating Anvil KSP to Metro 2025-09-04 16:48:34 +02:00
Benoit Marty 84130da367 Code cleanup 2025-08-11 14:53:40 +02:00
Benoit Marty e35eebf084 Add unit test on DefaultSessionWellknownRetriever 2025-08-11 12:13:21 +02:00
Benoit Marty bac59f6caa Merge 2 mapCatchingExceptions into a single one. 2025-08-11 10:55:42 +02:00
Benoit Marty d277a604bb Inject the Json parser 2025-08-11 10:49:39 +02:00
Benoit Marty 275c5b41c5 Fix compilation issue 2025-08-08 18:08:30 +02:00
Benoit Marty d9b274b6cf Let enterprise build be able to override (or disable) the bug report URL. 2025-08-08 17:23:39 +02:00
Benoit Marty d292a52f63 Introduce SessionWellknownRetriever and implementation that uses a MatrixClient. 2025-08-08 15:06:51 +02:00
Benoit Marty db64ce3142 Extract code to retrieve .well-known files to its own modules. 2025-08-08 12:36:48 +02:00