Commit Graph

132 Commits

Author SHA1 Message Date
Doug
0bd72114b8 Add tests for loading Classic accounts.
Tidy up warnings and fix a few bugs that were revealed.
2026-03-11 17:42:53 +00:00
Doug
ac233a9145 Simplify ClassicAppAccount loading (only load what we need). 2026-03-11 17:42:53 +00:00
Mauro Romito
44303bdee7 Add support for reading accounts from Element Classic. 2026-03-11 17:42:53 +00:00
Stefan Ceriu
2ed469dab4 Fix missing QRCodeLoginErrors after cherry picking from draft PR. 2026-03-02 18:14:21 +02:00
Hugh Nimmo-Smith
026bcb20b4 Add mappings for additional errors in Link new device
Depends on a matrix-rust-sdk update
2026-03-02 18:14:21 +02:00
Doug
8e6f9f482b Lock the Link New Device flow to portrait and improve Cancel/Try Again handling. (#5094)
* Lock the LinkNewDeviceScreen to portrait.

* Add cancel buttons to the QR Code errors and handle cancel/startOver correctly.

* Use the shared QRCodeErrorView in the LinkNewDeviceScreen.

* Clarify the different QR Error/ErrorStates a bit more.

* Update snapshots.
2026-02-12 11:21:24 +00:00
Hugh Nimmo-Smith
90800440d7 Treat NotFound error as expired in Sign in with QR/Link new device 2026-02-09 14:22:27 +02:00
Stefan Ceriu
04053ae69b Update files following swiftformat upgrade 2026-01-27 12:50:57 +02:00
Doug
e4d961225a Silence some warnings. (#4969) 2026-01-19 15:16:16 +00:00
Doug
15eae621b2 Add tests for linking a new device. (#4934)
* Replace GrantLoginWithQrCodeHandlerSDKMock with LinkNewDeviceServiceMock.

Add tests for all initial states on the QRCodeLoginScreen.

* Add tests for linking both mobile and desktop devices.

* Add UI tests for linking a new device.

* Don't show the Link Desktop Computer button when running on macOS.

This mirrors the decision to hide the Sign In With QR Code button on the start screen.
2026-01-09 13:10:14 +00:00
Doug
7c839efffc Add support for linking new devices in the QRCodeLoginScreen. (#4891)
* Adds the remaining parts for showing/scanning a QR code to link a new device.

* Refactor the QRCodeLoginService to work the same way as the LinkNewDeviceService.
2026-01-07 12:18:39 +00:00
Doug
046cf6c120 General tidy-up related to QR codes. (#4865)
* Tidy-up Rust to Swift mapping.

* Refactor out a dedicated QRCodeErrorView.

* Use the new QRCodeErrorView for most error state snapshots.

* Simplify QRCodeErrorView structure.

Also updates the background to match the designs.

* Fix a small compile error in the unit tests.
2025-12-16 15:59:59 +00:00
Doug
8df57abc1e Add a service and flow coordinator for the LinkNewDevice feature. (#4859)
* Add a LinkNewDeviceService that exposes the SDK's grant QR code login methods.

* Add a flow coordinator for linking a new device.

Changes the presentation too.
2025-12-15 14:44:26 +00:00
Doug
a886aa245a Update the SDK. (#4792) 2025-11-27 21:15:27 +00:00
Doug
2ff52ce785 Fix another bug where the app could crash on launch if the access token had expired. (#4733)
Updates the SDK.
2025-11-11 15:29:23 +00:00
Doug
bf533e0572 Fix a potential bug where the token couldn't be refreshed when the cached server /versions had expired. (#4687)
* Update SDK mocks for UniFFI 0.30.0

* Update the SDK.

* Update the SDK again

Includes a temporary workaround that patches the SDK's generated Swift files so that our tests don't crash:
3f0075fb8a
2025-11-03 19:09:31 +00:00
Doug
911550bff0 Respect the order of joined spaces as defined by Element Web. (#4663)
Update the SDK to support joined space ordering.
2025-10-28 09:24:12 +00:00
Mauro
6160c44d67 Update copyright holding and dates (#4640)
* Update copyright holding and dates

* compound IDE Macros updated

* update copyright

* update copyrights done

* update templates and README
2025-10-21 14:34:56 +02:00
Doug
9ff82a478e Add a feature flag for spaces. (#4429)
* Remove the huge conditional compilation block on AppSettings.

It is still required for the ElementCallBaseURL however.

* Add a feature flag for spaces.
2025-08-22 13:47:23 +01:00
Doug
442df0e0bc Remove unnecessary slidingSyncVersion calls.
It's all native now :D
2025-07-30 14:42:59 +01:00
Stefan Ceriu
1e7afc93fa Remove threadRootEventID parameters from TimelineProxy send methods. This is now handled internally to the SDK as long as the right timeline instance is used. 2025-07-24 14:55:34 +03:00
Doug
b7867dac85 Make the remote settings hook usable within the app extensions. (#4342) 2025-07-22 17:09:53 +01:00
Doug
3cb815f7d4 Show an alert when entering an account provider that requires Element Pro. (#4326) 2025-07-17 12:41:26 +00:00
Doug
a489ec8a8c Merge the AuthenticationService with the QRCodeLoginService. (#4323)
* Merge the AuthenticationServer with the QRCodeLoginService.

* Merge AuthenticationClientBuilderFactory and AuthenticationClientBuilder into AuthenticationClientFactory

The separation is no longer needed now that password/OIDC login and QR code login have a similar API shape.
2025-07-15 17:59:15 +01:00
Doug
b0dd6ddf46 Update the SDK to fix a sync performance regression. (#4324) 2025-07-15 10:51:59 +00:00
Doug
755e4bf7a4 Update the SDK and build a client before logging in with a QR code. (#4320) 2025-07-14 13:31:06 +00:00
Stefan Ceriu
4d616c550c Add support for the new client wide threads feature flag
- enable it everywhere as it's safer than dealing with different configurations
2025-07-04 16:04:46 +03:00
Richard van der Hoff
24ce5c03de Add a developer option for history sharing on invite
Adds a new developer flag, enabling our experimental support for MSC4268.
2025-06-11 11:24:29 +03:00
Doug
33fcb8e667 Allow the app to be configured to bypass the server selection screen. (#4131)
* Make account provider configuration more flexible.

- Change defaultHomeserverAddress to an array of providers (needs UI).
- Add allowOtherAccountProviders to prevent the user from manually entering a provider.

* Refactor QR code scan failures into a common type.

* Validate scanned QR codes against the allowed account providers.

* Hide the login flow on the QR code screen when restricted.
2025-05-20 11:09:50 +01:00
Doug
cb5c7337d2 Add support for Account Provisioning links. (#4108)
* Add support for account provisioning links and route them to the authentication flow.

* Use the provisioning parameters to configure the authentication flow.

* Add UI tests for the provisioned authentication flow.

* Record new preview snapshots.

* Add unit tests.

* Make the domain configurable in the app settings.

* Use the loginHint in the login screen too.
2025-05-12 13:28:34 +01:00
Doug
21b4f5805b Add a state machine to the AuthenticationFlowCoordinator. (#4103) 2025-05-08 15:41:52 +01:00
Mauro Romito
b6ade2d4a9 updated SDK and improved report flow
the report flow is now based on the matrix version and the new one will only be used if the SDK checks if the server supports it.
2025-04-30 11:41:19 +02:00
Doug
5bea0f8c9d Remove the support email address from the OIDC configuration. (#4059)
The contacts property has been removed from the SDK.
2025-04-23 09:24:53 +01:00
Doug
fb104a4077 Refactor SecureBackupControllerListener into SDKListener and use it everywhere. (#4030) 2025-04-16 08:36:57 +01:00
Mauro Romito
6c07af84cc sdk: update to 25.04.14 2025-04-14 14:15:42 +02:00
Doug
2461933993 Simplify authentication logic
matrix.org now supports MAS so we don't need the web registration helper anymore.
2025-04-11 11:22:39 +01:00
Stefan Ceriu
3549dd560b Bump the RustSDK to v25.04.08, fix breaking changes 2025-04-08 12:23:37 +03:00
Stefan Ceriu
346e4adde3 Remove the event cache feature flag, it's enabled by default on the SDK and we haven't had any bug reports for it. 2025-04-03 18:08:34 +03:00
Stefan Ceriu
881017f97a Bump the RustSDK to v25.04.02 2025-04-03 18:08:34 +03:00
Mauro Romito
0ee2199645 updated the SDK to 25.03.24 2025-03-25 12:17:11 +01:00
Doug
0126932df0 Update the SDK to 25.03.20. (#3925) 2025-03-20 13:18:06 +00:00
Stefan Ceriu
1ae6fc67c4 SDK update (#3891)
* Bump the RustSDK to v25.03.11

* Replace oidc login prompt with nil following the changes from https://github.com/matrix-org/matrix-rust-sdk/pull/4761

```
/// * `prompt` - The desired user experience in the web UI. No value means
///   that the user wishes to login into an existing account, and a value of
///   `Create` means that the user wishes to register a new account.
```

* Fix trailing closure warnings

* Update the client proxy after making `getNotificationSettings()` and  `cachedAvatarUrl()` async (they used to be blocking on the rust side).

* Move `Room.isEncrypted` to the info publisher and manually update the encryption state when creating the room.

* Bump the SDK again to v25.03.12 - This introduces a new way to configure the tokio runtime that we can use to have extensions use less memory
- introduce a new Target struct that takes care of setting up rust services (tracing and tokio) for our various targets
- cleanup MXLog and friends

* Address PR comments

* Bump the SDK again, switch back to using `.consent` as the OIDC login prompt (which was reintroduced in matrix-org/matrix-rust-sdk/pull/4791)
2025-03-13 11:17:37 +02:00
Doug
74511e0570 Update the SDK.
Handles changes that removed support for the sliding sync proxy.
2025-02-18 11:55:20 +00:00
Mauro
63d059b342 updated the SDK (#3737) 2025-02-04 16:57:39 +00:00
manuroe
c29f4cc9b4 Dual licensing: AGPL + Element Commercial (#3657)
* New LICENSE-COMMERCIAL file

* Apply dual licenses: AGPL + Element Commercial to file headers

* Update README with dual licensing
2025-01-06 11:27:37 +01:00
Stefan Ceriu
a297643443 Bump the RustSDK to v1.0.79; add a feature flag for the new rust side ClientBuilder::useEventCachePersistentStorage 2024-12-10 18:19:31 +02:00
Stefan Ceriu
51751606ca Adopt various rust side Timeline API additions (#3423)
* Adopt new reaction toggling API introduced in matrix-org/matrix-rust-sdk/pull/4127

* Adopt the changes introduced in matrix-org/matrix-rust-sdk/pull/4111: use the new `TimelineUniqueId` type instead of `String` for unique timeline identifiers.

* Bump the RustSDK to v1.0.58.

* Fix unit tests
2024-10-16 19:08:34 +03:00
Stefan Ceriu
45d59c57d6 Bump the RustSDK to v1.0.53: adopt latest record based timeline item APIs (#3356) 2024-10-01 18:50:11 +03:00
Doug
e95fb7c27e Move the core logic in LoginScreenCoordinator into the ViewModel. (#3348) 2024-10-01 13:09:45 +01:00
Doug
aec4e3e8ca Selecting a server that doesn't support login now fails instead of letting you continue to a failure later. (#3342)
* Fail configuration of the authentication service if the homeserver doesn't support login.

* Move the ServerSelectionCoordinator logic into the ViewModel.

- Handle the new login alert.
- Add more tests
2024-09-27 13:58:05 +01:00