Commit Graph

15464 Commits

Author SHA1 Message Date
ganfra cf2ce2bd65 Use Profiles sliding sync extension check for own profile subscription (#7403)
* Use Profiles sliding sync extension check for own profile subscription

---------

Co-authored-by: Jorge Martin Espinosa <jorgem@element.io>
2026-08-19 13:00:27 +02:00
hayyaksi 6bd841d838 Close the invite screen once the invite has been declined (#7440)
Declining an invite from the full screen invite left the user on that
same screen, so they had to press back themselves to get to the room
list. Both decline paths are affected: the plain decline handled by
AcceptDeclineInviteView, and the decline and block sub screen, which
navigated up into the join room flow instead of out of it.

Navigate up from the join room flow on a successful decline, and give
DeclineInviteAndBlockEntryPoint a callback so the sub screen can report
a successful decline separately from a back press. The room list flow
supplies the same callback, popping the sub screen once the invite has
been declined.
2026-08-19 12:52:11 +02:00
Benoit Marty 03c69be722 Merge pull request #7477 from element-hq/feature/bma/normalizeUserAgent
Normalize the applicationName used in user agent
2026-08-19 12:35:56 +02:00
hayyaksi ee1348e19e Give the room name in the timeline top bar a 48dp tap target (#7450)
* Give the room name in the timeline top bar a 48dp tap target

The row carrying the room avatar and name is the control that opens the
room details, but it is only as tall as its content, which is under the
48dp minimum recommended for a touch target. Constrain it to a minimum
height of 48dp. The children stay centred inside the app bar, so nothing
moves visually.

* Update screenshots

The accessibility snapshot of the timeline is the only one the change
affects: the node which opens the room details now reports a 48dp tall
bounding box. The room name, the avatar and the icons stay where they
were.
2026-08-19 12:29:24 +02:00
Benoit Marty ff89302cf5 Normalize the applicationName used in user agent, as HTTP spec does not allow UTF-8 chars in headers. 2026-08-19 11:56:34 +02:00
Jorge Martin Espinosa a1e86ad499 Use the right base URL for the ESS config/well known endpoints (#7469)
* Rename `UrlContentFetcher` to `ClientUrlContentFetcher` and add missing base URL data (server name, homeserver URL)

* Avoid passing the `homeserverUrl/serverName` around.

Calculate the URL in `DefaultRemoteEnterpriseConfigRetriever` using the newly added `homserver` and `server` values as the possible base URLs, depending on the remote config source

* Make sure we don't perform blocking requests to fetch the remote config when restoring a session

Add a `needsRefresh` parameter to `RemoteEnterpriseConfigResult.NotFound` to handle this, and store a `no-config` value in the store to indicate an endpoint has been checked and no config was found

* Bump enterprise module
2026-08-19 09:24:22 +02:00
Jorge Martin Espinosa c31d7e6cce Don't restart the sync service if the client is shutting down (#7472)
* Don't restart the sync service if the client is shutting down

This was causing issues when clearing the cache:

1. The client would ask the SDK to clear the caches.
2. The SDK would stop the sync service, clear the caches and set the `pos` value of sliding sync to 0 so the HS returns all the required state the next time the client is used.
3. However, between the sync service being stopped with the `pos=0` change and the client being destroyed, there was enough time for the `SyncOrchestrator` to decide the sync service was stopped for no good reason since there is network connectivity and the app is on foreground, so it restarted the sync, with `pos=0`.
4. This value was persisted, and the next time the new client did an 'initial sync' it had a `pos != 0`, which the HS uses to avoid returning some required state it already fetched.
5. The room list now lacks state events for lots of rooms and room names, avatars, members, etc. are now missing.

---------

Co-authored-by: Benoit Marty <benoitm@element.io>
2026-08-18 16:50:57 +00:00
Benoit Marty 32416581d4 Merge pull request #7473 from element-hq/feature/bma/improveBuildTimeConfig
Improve build time config and update the Firebase configuration
2026-08-18 18:21:57 +02:00
Benoit Marty 1fefbc9943 Firebase configuration location has changed. 2026-08-18 17:39:21 +02:00
Benoit Marty 07983221e6 Move google_app_id to resource files. 2026-08-18 16:25:57 +02:00
Benoit Marty ccebb55ca7 Improve documentation 2026-08-18 15:46:24 +02:00
Benoit Marty 815b2a895e Reorder items and specify type explicitly so that diff is minimal when comparing to a generated file for a variant build. 2026-08-18 11:18:18 +02:00
Benoit Marty dfbc75a9e1 Merge pull request #7428 from element-hq/feature/bma/timeoutInReadyToScanScreen
[LinkNewDevice] Ensure the notice screen is also protected by the timeout.
2026-08-18 10:07:36 +02:00
Benoit Marty 3c21af2a57 Merge pull request #7437 from hayaksi1/fix/4594-leave-room-not-found
Show an error when the room to leave cannot be found
2026-08-18 10:06:01 +02:00
Benoit Marty c3442d3a03 Merge pull request #7439 from hayaksi1/fix/5153-sanitize-carriage-return
Exclude carriage returns from the login and password fields
2026-08-18 10:05:40 +02: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 a54b624cd7 Merge pull request #7442 from hayaksi1/fix/6429-remove-inplace-fix
Remove the F-Droid dex patching step from the release script
2026-08-18 10:04:56 +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
Benoit Marty 3ea36d54b4 Merge pull request #7451 from hayaksi1/fix/7059-relax-image-compression
Relax image compression so photos and screenshots keep more detail
2026-08-18 10:03:36 +02:00
Benoit Marty a36ccbaae2 Merge pull request #7455 from hayaksi1/fix/4582-autoscroll-focused-field
Keep the focused login field visible above the keyboard
2026-08-18 10:03:22 +02:00
hayyaksi cb6ac751cc Refresh the room members when a mention is started (#7438)
* Refresh the room members when a mention is started

The mention suggestions read room.membersStateFlow, which is a cache filled
only by an explicit updateMembers() call. Nothing calls it while a room is
open, so a member who joined after the room was opened never appears in the
suggestion list until the room is left and entered again.

Call updateMembers() when a mention search starts. The trigger is
distinctUntilChanged on "the current suggestion is a mention", so it fires
once per mention rather than on every keystroke, and fetchRoomMembers already
no-ops while a fetch is in flight.
2026-08-17 21:10:08 +02:00
hayyaksi 75607c73ec Keep transparency when an image is shared into the app with an imprecise mime type (#7452)
* Resolve the real image format before choosing the encoder

The upload pre-processor picks the encoder from the mime type it is
given. When an image is shared from another app that type is often
broader than the image really is, so a transparent PNG shared as a
wildcard image type is re-encoded as JPEG and its alpha channel is
flattened to black.

Read the format from the image header when the declared type is not
already a concrete PNG or JPEG, and use that to decide both whether the
image can be compressed at all and which encoder to use.

* Cover the mime type fallbacks the wildcard resolution introduced

resolveImageMimeType now decides whether an image is compressible, so two of
its outcomes had no test: a GIF shared with a wildcard type has to be
recognised and left uncompressed rather than recompressed into a still, and a
file the decoder cannot read at all has to fall back to the type it was shared
with.

The isMimeTypeImage() guard on the decoded type is dropped with them. The
BitmapFactory decoders only ever report an image type in outMimeType, so the
guard could not fire and there was no way to exercise it.
2026-08-17 21:08:48 +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
Jorge Martin Espinosa 8b2c207728 Move the :libraries:wellknown logic into enterprise modules (#7429)
* Extract `IsEnterpriseBuild` use case

Having it inside `EnterpriseService` made having DI cycles with the `BuildMeta` provider too easy

* Rename `EnterpriseService.defaultHomeserverList()` to `homeserverAllowList()`

This seems more aligned with the way this list works

* Move most of the logic from `:libraries:wellknown` to `:enterprise:feature:enterprise`, both `shared` and `impl` modules

Ideally I would have added everything into `impl`, but some of the classes needed to be shared between the different `:enterprise:features` modules, and those are in the `shared` module, lacking a better name/strategy

* Add `EnterpriseService.isElementProEnforced`

With this, we don't need to provide the `RemoteEnterpriseConfig` anymore to any consumers, everything goes through `EnterpriseService` or other providers

* Remove `EnterpriseService.overriddenElementWellKnown`

This leaks the remote enterprise config/element well known contents to the app in a public interface.

* Create `CustomMapTilerConfigProvider` to avoid leaking the `RemoteEnterpriseConfig` in public APIs

This commit also starts moving some of the well-known related values to the enterprise modules

* Add missing docs to `EnterpriseService` and `SessionEnterpriseService`

* Fix tests

* Fix lint issues

* Bump enterprise module
2026-08-17 13:21:47 +00:00
Cipherd f94566e44f Fix outgoing session verification stuck with incomplete recovery setup (#7433) 2026-08-17 15:14:45 +02:00
hayyaksi 12791406ca Explain a rate limiting push gateway in the notification troubleshooter (#7448)
* Explain a rate limiting push gateway in the notification troubleshooter

The push loop back test printed whatever HTTP status the gateway
answered, so a user throttled by the public ntfy.sh gateway was told
"Error: HTTP 507", which reads as a server fault rather than as a quota
they can wait out or move away from.

Map the two statuses that mean the notification was throttled onto a
typed failure and give the troubleshooter a message that says what to do.

* Import strings from localazy, remove `temporary.xml` in `:libraries:push:impl`

---------

Co-authored-by: Jorge Martín <jorgem@element.io>
2026-08-17 15:14:15 +02:00
Benoit Marty 98c3067514 Merge pull request #7432 from element-hq/renovate/org.maplibre.compose-maplibre-compose-0.x
Update dependency org.maplibre.compose:maplibre-compose to v0.14.0
2026-08-17 14:50:27 +02:00
Benoit Marty 5a71cc31e8 Merge pull request #7461 from element-hq/feature/bma/syncStrings
Sync strings - New language supported: Arabic
2026-08-17 14:30:02 +02:00
Benoit Marty 054d592391 Sync again 2026-08-17 12:10:39 +02:00
Benoit Marty 5ac1fe2409 Remove temporary string. 2026-08-17 12:10:18 +02:00
Benoit Marty a740423343 Sync strings. 2026-08-17 11:34:52 +02:00
hayaksi1 932a4d013c Relax image compression so photos keep more detail
Images are downscaled against a 640px reference, which makes inSampleSize
halve the source one step further than the documented intent: the KDoc
says images should be sent at up to 1280x1280, but a 12000x3916 photo is
sent as 3006x979. Text in screenshots and detail in photos is lost at
that size.

Raise the reference to 1280. inSampleSize is a power of two, so this
moves each image one step up rather than to an exact size.
2026-08-17 11:33:41 +03:00
hayaksi1 9a4daa19b2 Keep the focused login field visible above the keyboard
On shorter screens the software keyboard can cover the field the user is
typing into on the login and account provider screens, because nothing
scrolls the content back into the reduced viewport once the keyboard is
shown.

Apply the existing bringIntoViewOnImeVisible modifier to those fields,
the same way the recovery key screen already does.
2026-08-17 11:33:10 +03:00
Benoit Marty 2ac11ebe14 Clarify the comments 2026-08-17 10:30:57 +02:00
Benoit Marty d0a1011638 Add documentation on LinkNewDesktopHandler and LinkNewMobileHandler 2026-08-17 10:06:26 +02:00
Benoit Marty aa6f70530a [LinkNewDevice] Move the timeout management when linking a new desktop device to the LinkNewDeviceFlowNode so that it can also be used for the DesktopNotice screen. 2026-08-17 10:06:25 +02:00
renovate[bot] 1a3b89de12 Update dependency io.github.sergio-sastre.ComposablePreviewScanner:android to v0.9.2 (#7431)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-17 07:33:18 +00: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 999bee2420 Remove the F-Droid dex patching step from the release script
fix-pg-map-id.py rewrites the pg_map_id of a dex file, but the dex
format changed and its regex no longer matches anything, so the step is
a no-op and the F-Droid build is reproducible without it. inplace-fix.py
only existed to drive it; none of its other commands are used here.

The removed call also re-ran zipalign -P 16 on each APK. AGP aligns the
release APKs at packaging time and apksigner is already invoked with
--alignment-preserved, so the signed output stays 16 KB aligned.
2026-08-17 03:40:53 +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
hayaksi1 c901b902b1 Exclude carriage returns from the login and password fields
The sanitize() helper applied to the login, password and account deactivation
password fields promises to remove "any new line characters" but only removes
LF. A value pasted from a source with CRLF endings keeps its CR, which is
invisible in the field and is sent to the homeserver as part of the password,
so the login is rejected while typing the same characters by hand works.

Drop every line separator instead of LF only, in both copies of the helper.
Whitespace that can legitimately be part of a password, such as spaces and
tabs, is left untouched.
2026-08-16 22:44:48 +03:00
hayaksi1 04dcc14eaa Show an error when the room to leave cannot be found
showLeaveRoomAlert ran its whole body inside client.getRoom(roomId)?.use { }.
When getRoom returned null, which happens for a room the client can no longer
resolve, the body was skipped without writing any state: leaveAction stayed
Uninitialized, so no confirmation dialog and no error was displayed and
Leave room appeared to do nothing at all.

Handle the missing room explicitly and surface it as a failure, which
AsyncActionView already renders with the generic error dialog. leaveRoom used
a !! for the same lookup, so it reported the miss as a NullPointerException;
it now throws the same named exception.
2026-08-16 22:44:29 +03:00
renovate[bot] 45057b35a5 Update dependency org.maplibre.compose:maplibre-compose to v0.14.0 2026-08-15 09:07:16 +00:00
Benoit Marty 23b75c3423 Fix outdated documentation. (#7430) 2026-08-15 11:05:43 +02:00
Benoit Marty e1adc938fd Merge pull request #7424 from element-hq/revert-7378-fix/6853-remember-revealed-images
Revert "Keep manually revealed media visible when re-entering a room"
2026-08-14 17:37:31 +02:00
Benoit Marty 9e32801d02 Merge pull request #7426 from element-hq/feature/bma/documentation
Add KDoc to all the interfaces of the api modules
2026-08-14 13:46:28 +02:00
Benoit Marty 7d9f4b9af4 Fix outdated documentation. 2026-08-14 12:22:37 +02:00
Benoit Marty 1ab401482a Fix formatting issues 2026-08-14 12:20:49 +02:00
renovate[bot] 2c94cee575 Update dependency org.matrix.rustcomponents:sdk-android to v26.08.13 (#7420)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-08-14 12:18:43 +02:00
Benoit Marty b74b146917 Add KDoc to the single-interface library and service API modules
Cover the last remaining interfaces across libraries/audio, libraries/cachestore,
libraries/indicator, libraries/slashcommands, libraries/voiceplayer and
services/apperror, with their members and parameters.

This completes the effort: all 222 in-scope interfaces and their 820 members in
the 60 api modules that hold any now carry documentation.

Notable points: CacheStore applies no expiry of its own and only records when each
entry was written, leaving staleness to the caller; SlashCommandService.parse
never throws, returning NotACommand for ordinary text and an error case for a
malformed command.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-14 12:04:40 +02:00