Kévin Commaille
f4bb14a30e
refactor(oauth): Rename OidcSession to OAuthSession
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-18 17:18:34 +01:00
Kévin Commaille
0a345a3124
refactor(oauth): Rename OidcAuthData to OAuthAuthData
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-18 17:18:34 +01:00
Kévin Commaille
450a66ad11
refactor(oauth): Rename OidcCtx to OAuthCtx
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-18 17:18:34 +01:00
Kévin Commaille
6f3694cfa9
refactor(oauth): Rename Oidc API to OAuth
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-18 17:18:34 +01:00
Kévin Commaille
1658610f93
refactor(sdk): Rename oidc module to oauth
...
Since we mostly use OAuth 2.0 now.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-18 17:18:34 +01:00
Kévin Commaille
f9b1bdb22d
chore: Add changelog for LocalServerBuilder
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-18 09:55:01 +01:00
Kévin Commaille
f8abb85e9e
refactor(oidc_cli): Use LocalServerBuilder
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-18 09:55:01 +01:00
Kévin Commaille
1b5e6462ee
refactor(sdk): Use LocalServerBuilder with SsoLoginBuilder
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-18 09:55:01 +01:00
Kévin Commaille
fbdd8839e6
feat(sdk): Expose a local server builder
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-18 09:55:01 +01:00
dependabot[bot]
d86117ac70
chore(deps): bump crate-ci/typos from 1.30.1 to 1.30.2
...
Bumps [crate-ci/typos](https://github.com/crate-ci/typos ) from 1.30.1 to 1.30.2.
- [Release notes](https://github.com/crate-ci/typos/releases )
- [Changelog](https://github.com/crate-ci/typos/blob/master/CHANGELOG.md )
- [Commits](https://github.com/crate-ci/typos/compare/v1.30.1...v1.30.2 )
---
updated-dependencies:
- dependency-name: crate-ci/typos
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-03-17 20:24:01 +01:00
dependabot[bot]
914b7125cf
chore(deps): bump tj-actions/changed-files
...
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files ) from dcc7a0cba800f454d79fff4b993e8c3555bcc0a8 to 0fee5fb278312d962ff465bb38dc4cae9f446de2.
- [Release notes](https://github.com/tj-actions/changed-files/releases )
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md )
- [Commits](dcc7a0cba8...0fee5fb278 )
---
updated-dependencies:
- dependency-name: tj-actions/changed-files
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
2025-03-17 18:32:00 +02:00
Richard van der Hoff
ad0223cafb
Merge pull request #4775 from matrix-org/rav/history_sharing/room_key_bundle
...
crypto: support for building key bundles
2025-03-17 11:45:38 +00:00
Richard van der Hoff
a870c02eab
test: snapshot test for HistoricRoomKey::debug
2025-03-17 11:24:52 +00:00
Richard van der Hoff
002e77616d
crypto: support for building key bundles
...
Add a method to CryptoStore which will construct a key bundle, ready for
encrypting and sharing with invited users.
Part of https://github.com/matrix-org/matrix-rust-sdk/issues/4504
2025-03-17 11:24:52 +00:00
Michael Telatynski
d777e68c4a
Pin tj-actions/changed-files
...
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com >
2025-03-17 10:26:15 +00:00
Ivan Enderlin
cabb345a1c
fix(xtask): Add --limit 100 to gh pr list.
...
Because yes, some weeks, we are very productive!
This patch adds `--limit 100` to `gh pr list` so that we are sure to not
miss pull requests if there are many.
2025-03-14 18:04:33 +01:00
Kévin Commaille
2f08f27b59
chore: Add changelog about removing mas-oidc-client
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-14 18:03:34 +01:00
Kévin Commaille
3a7b0e9404
refactor(oidc): Remove dependency on mas-oidc-client
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-14 18:03:34 +01:00
Kévin Commaille
7713ce768a
refactor(oidc): Create ClientMetadata type
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-14 18:03:34 +01:00
Kévin Commaille
aea573d001
refactor(oidc): Import code to register a client
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-14 18:03:34 +01:00
Kévin Commaille
7ca6494efa
refactor(oidc): Remove support for software statement
...
It is not mentionned in MSC2966
2025-03-14 18:03:34 +01:00
Kévin Commaille
6f44853bf7
refactor(oidc): Use Url for the issuer
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-14 18:03:34 +01:00
Kévin Commaille
2c6c818005
refactor(oidc): Use ruma's server metadata type
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-14 18:03:34 +01:00
Kévin Commaille
abc4fbc2f7
refactor(oidc): Import code to discover OIDC provider configuration
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-14 18:03:34 +01:00
Kévin Commaille
9adff21f78
refactor(oidc): Import code for building the account management URL
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-14 18:03:34 +01:00
Kévin Commaille
91f9ef85ae
refactor(oidc): Add type alias for oauth2 errors
...
To have less verbose and more predictable error types.
2025-03-14 18:03:34 +01:00
Ivan Enderlin
17c6ad6b70
test(ui): Ensure Timeline runs a redecryption for all UTD.
...
This patch adds two tests, ensuring UTD stored in the event cache are
decrypted, whether they come from the initial items or paginated items.
2025-03-14 14:18:21 +01:00
Ivan Enderlin
8f61bdb046
fix(ui): Events received from the event cache trigger a decryption.
...
This patch fixes a bug where events coming from the event cache might be
encrypted, see https://github.com/matrix-org/matrix-rust-sdk/issues/4762
to learn more.
This patch updates the `room_event_cache_updates_task` to call
`TimelineController::retry_event_decryption` if the origin is `Cache`.
2025-03-14 14:18:21 +01:00
Ivan Enderlin
53c36226cb
refactor(ui): TimelineController::retry_event_decryption no longer needs a &Room.
...
This patch removes the room `&Room` argument of
`TimelineController::retry_event_decryption`. The `TimelineController`
already has the room with its `room(&self) -> &Room` method. This method
was always used to fetch the room, let's expect `retry_event_decryption`
to do that by itself.
It also prevents passing the “wrong” room. This is more robust this way.
2025-03-14 14:18:21 +01:00
Ivan Enderlin
5a22944f52
chore(ui): Move an inline comment.
...
This patch moves an inline comment in its correct place. Code
was inserted between the comment and the part of the code it was
documenting.
2025-03-14 10:51:49 +01:00
Ivan Enderlin
494f93d2a4
chore(ui): Move the RoomKeyInfo task inside its own function.
...
This patch moves the task responsibles to handle the `RoomKeyInfo`
updates into its own function.
The goal is to get simpler code.
2025-03-14 10:51:49 +01:00
Ivan Enderlin
d7849a1aa5
chore(ui): Move the BackupState task inside its own function.
...
This patch moves the task responsibles to handle the `BackupState`
updates into its own function.
The goal is to get simpler code.
2025-03-14 10:51:49 +01:00
Ivan Enderlin
bc9adaab06
chore(ui): Move the rooms keys from backups task inside its own function.
...
This patch moves the task responsibles to handle the room keys from
backups into its own function.
The goal is to get simpler code.
2025-03-14 10:51:49 +01:00
Ivan Enderlin
1ec47ca24f
chore(ui): Move the RoomSendQueueUpdate task inside its own function.
...
This patch moves the task responsibles to handle the
`RoomSendQueueUpdate`s into its own function.
The goal is to get simpler code.
2025-03-14 10:51:49 +01:00
Ivan Enderlin
faa2fa2ef0
chore(ui): Move the pinned event IDs stream task inside its own function.
...
This patch moves the task responsibles to handle the pinned event IDs
stream into its own function.
The goal is to get simpler code.
2025-03-14 10:51:49 +01:00
Ivan Enderlin
33e8b453ee
chore(ui): Move the RoomEventCacheUpdate task inside its own function.
...
This patch moves the task responsibles to handle the
`RoomEventCacheUpdate`s into its own function.
The goal is to get simpler code.
2025-03-14 10:51:49 +01:00
Ivan Enderlin
b9fadd0a10
fix(base): Do not define the RoomInfoNotableUpdate's channel based on number of rooms.
...
When `BaseClient` is created, the rooms aren't loaded yet. Then,
calculating the size of the channel for `RoomInfoNotableUpdate` is
useless, as it will always be zero, and we will fallback to 500 every
time. By the way, 500 is a nice default. This patch uses this value as
the only channel's size.
2025-03-14 10:43:12 +01:00
Richard van der Hoff
294fd79947
multiverse: support passing a server URL
...
Allow use of a server url (eg `http://localhost:8008 `), enabling connection to
a local server rather than one which supports well-known, TLS, and the rest.
2025-03-13 20:16:54 +01:00
Ivan Enderlin
8b6096729c
fix(sdk): event_cache::Room::replace_all_events_by takes an EventsOrigin.
...
This patch updates `replace_all_events_by` to take an `EventsOrigin`.
It is called in two places: by `add_initial_events`, in which case it
is `EventsOrigin::Cache`, and by `handle_timeline`, in which case it is
`EventsOrigin::Sync`.
2025-03-13 09:23:24 +01:00
Ivan Enderlin
6f370daaed
fix(sdk): Replace assert! by debug_assert!.
...
This patch replaces a call to `assert_eq` and `assert` by
`debug_assert_eq` and `debug_assert`. We don't want to panic in
production :-].
2025-03-13 09:23:24 +01:00
Ivan Enderlin
3c694e7909
fix(sdk): event_cache::Room::clear sends EventsOrigin::Cache.
...
This patch updates the `EventsOrigin` value sent by `Room::clear` to be
`Cache` instead of `Sync`. No events are added, but the `VectorDiff`s
are generated from the event cache itself, not from a sync.
2025-03-13 09:23:24 +01:00
Ivan Enderlin
c3245a4f22
fix(sdk): Events loaded from the cache have EventsOrigin::Cache.
...
This patch fixes the `EventsOrigin` value for events loaded from the
cache, it was `Pagination`, now it is `Cache`.
2025-03-13 09:23:24 +01:00
Ivan Enderlin
da89a53605
feat(ui): Add EventItemOrigin::Cache.
...
With more and more events coming from the event cache, it's nice to know
that an event actually from the cache instead of having `None`.
2025-03-13 09:23:24 +01:00
Ivan Enderlin
968582af01
chore(ui): Update a log message.
...
This patch changes the log message. A `TimelineItemPosition::UpdateAt`
can only happen for remote event, not local event. The log message
was talking about _decryption_ but an `UpdateAt` can also happen for
redaction. This was misleading.
2025-03-13 09:23:24 +01:00
Ivan Enderlin
07c7b6ab2a
fix(ui): Pass the correct RemoteEventOrigin to replace_with_initial_remote_events.
...
This patch updates the `RemoteEventOrigin` value passed to
`TimelineController::replace_with_initial_remote_events` when there is
a lag with the event cache. The previous value was `Sync`, but it should
be `Cache` since these events come from the event _cache_ (it was in the
name, easy).
2025-03-13 09:23:24 +01:00
Ivan Enderlin
5aae0cbcd9
test: Fix a test in NotificationClient.
...
With the previous patch, `NotificationClient` with sliding sync now
knows immediately when the room is encrypted or not.
2025-03-12 16:53:59 +01:00
Ivan Enderlin
3ea842dae4
test(base): Test that room encryption is correctly computed.
2025-03-12 16:53:59 +01:00
Ivan Enderlin
31e0bfa400
feat: Install RequestedRequiredStates and add handle_encryption_state.
...
This patch updates the sync code to include the
`RequestedRequiredStates` type.
This patch also adds `RoomInfo::handle_encryption_state` which
is able to mark an encryption state as synced depending of
`RequestedRequiredStates` (read the comment in the code).
This patch also updates the documentation of
`RoomInfo::handle_state_event` to clarify the impact of a
`m.room.encryption` state event.
2025-03-12 16:53:59 +01:00
Ivan Enderlin
d32b10de80
feat: Introduce RequestedRequiredStates.
...
This patch introduces a new type: `RequestedRequiredStates`, which keeps
track of all `required_states` passed to a sync request. So far, there
is only a `From` implementation for MSC4186.
2025-03-12 16:53:59 +01:00
Kévin Commaille
215853cf67
chore: Upgrade ruma
...
To pull in`GrantType::DeviceCode` and a fix for the generated `DeviceId`
length.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-03-12 13:41:40 +01:00