Commit Graph

13223 Commits

Author SHA1 Message Date
Benjamin Bouvier
6f780a499c test(timeline): use assert_let_timeout more in the timeline's code 2025-01-16 12:26:32 +01:00
Benjamin Bouvier
425e48a46d feat(linked chunk): add LinkedChunk::replace_item_at to replace an item from a given position 2025-01-16 12:26:32 +01:00
Richard van der Hoff
3dd81fbe2c test: rename snapshots not to contain :
Windows doens't allow you to have `:` in its filenames
2025-01-16 11:11:38 +00:00
Benjamin Bouvier
6a0333e812 test: replace Option::default() by None 2025-01-16 11:34:42 +01:00
Benjamin Bouvier
b3a789af90 test: get rid of the synced_client helper
Not running a large sync with many events make for simpler test cases,
with a more focused scope.
2025-01-16 11:34:42 +01:00
Benjamin Bouvier
560e582e41 test: get rid of mock_redaction and replace it with the holy MatrixMockServer 2025-01-16 11:34:42 +01:00
Benjamin Bouvier
de7397a20e feat(event cache): handle redacted redactions in the AllEventsCache
This is unlikely that it will affect us, so not worth adding a test IMO,
but for the sake of completeness: this handles redacted redactions in
the `AllEventsCache` too.
2025-01-16 10:05:45 +01:00
Andy Balaam
8bd94318c0 fix(tests): Fix a flaky test by marking a room's members as synced.
This is intended to prevent the test
`test_when_user_in_verification_violation_becomes_verified_we_report_it`
flaking. I found that sometimes when it called `Room::members` the
result was empty due to it trying to fetch the answer from the server.
This change prevents that behaviour. I don't know why the behaviour was
inconsistent before.
2025-01-15 15:24:49 +00:00
Richard van der Hoff
fe3cc09ae0 test: add examples for the new builder 2025-01-15 10:42:21 +00:00
Richard van der Hoff
3a3cc54067 test: generate dan's data dynamically 2025-01-15 10:42:21 +00:00
Richard van der Hoff
47f8b32ea1 test: give Dan new keys
Regenerate Dan's data with new cross-signing and device keys, for which I know
the private keys.

The signatures are manually calculated for now; this will be improved in a
later commit.
2025-01-15 10:42:21 +00:00
Richard van der Hoff
49748dbd4b test: factor out common parts of dan_keys_query_response{_loggedout} 2025-01-15 10:42:21 +00:00
Richard van der Hoff
25ea5fdd73 test: use builder for some more test data 2025-01-15 10:42:21 +00:00
Richard van der Hoff
5fadde5a6d test: implement test user data builder type
... and use it for some simple data
2025-01-15 10:42:21 +00:00
Richard van der Hoff
b6be4d5170 test: remove redundant sig on master key
Our test helper won't do this, and it's redundant
2025-01-15 10:42:21 +00:00
Richard van der Hoff
c9bac4ff2b test: snapshot the generated object rather than the JSON
We're going to be switching away from JSON-twiddling, so let's snapshot the
real object rather than the JSON.
2025-01-15 10:42:21 +00:00
Richard van der Hoff
fedf7d214f test: add some snapshot tests before we change anything 2025-01-15 10:42:21 +00:00
Valere
c969f903b7 Merge pull request #4526 from matrix-org/valere/test_encrypted_crypto_sql_snapshot
tests: Add an encrypted snapshot of a SQLite db for regression tests
2025-01-15 09:37:27 +01:00
Jorge Martín
bd5d7aafee feat(ffi): Add FFI bindings for fn Room::own_membership_details.
Also add `membership_change_reason` field to `ffi::RoomMember`.
2025-01-14 16:23:51 +01:00
Jorge Martín
e015a531da feat(room): Add fn Room::own_membership_details
This will retrieve the room member info of both the current user and the info for the sender of the current user's room member event.
2025-01-14 16:23:51 +01:00
Benjamin Bouvier
b9014a5e2a test: keep a single sync in test_delayed_invite_response_and_sent_message_decryption()
This removes one sync that happens in the background, because it's
likely spurious and may be confusing the server about what's been seen
by the current client.
2025-01-14 15:07:10 +01:00
Jorge Martín
e9487b0851 fix(timeline): Add UTDs to the timeline conditionally 2025-01-14 12:25:49 +01:00
Damir Jelić
c60bfb877a chore: Add some missing links to the changelog 2025-01-13 19:27:44 +01:00
Valere
ee32b1f600 tests: Add an encrypted snapshot of a SQLite db for regression tests 2025-01-13 17:50:50 +01:00
Daniel Salinas
9641aa9082 feat(send queue): Add an enqueued time to to-be-sent events (#4385)
Add a new created_at to the send_queue_events and
dependent_send_queue_events stored records. This will allow clients to
understand how stale a pending message might be in the event that the
queue encounters and error and becomes wedged.

This change is exposed through the FFI on the `EventTimelineItem` struct
as a new optional field named `local_created_at`. It will be `None` for
any Remote event, and `Some` for Local events (except for those that
were enqueued before the migrations were run).

Signed-off-by: Daniel Salinas

---------

Signed-off-by: Daniel Salinas <zzorba@users.noreply.github.com>
Co-authored-by: Daniel Salinas <danielsalinas@daniels-mbp-2.myfiosgateway.com>
Co-authored-by: Benjamin Bouvier <benjamin@bouvier.cc>
Co-authored-by: Daniel Salinas <danielsalinas@Daniels-MBP-2.attlocal.net>
2025-01-13 16:41:05 +00:00
Benjamin Bouvier
a8ca77f4fc feat(base): remove cached events when forgetting about a room 2025-01-13 17:36:33 +01:00
Benjamin Bouvier
e647ff935e feat(event cache store): allow removing an entire room at once 2025-01-13 17:36:33 +01:00
Benjamin Bouvier
7f04a9a18b fix(memory chunk): only remove a given room's events when clearing a roo 2025-01-13 17:36:33 +01:00
Damir Jelić
67d2cb790d chore: Fix a couple of typos 2025-01-13 17:25:00 +01:00
Benjamin Bouvier
279c78b3e2 chore!(encryption): rename are_we_the_last_man_standing to is_last_device
While the former name is arguably more fun, the latter is more
descriptive of what the function does.
2025-01-13 16:51:33 +01:00
Benjamin Bouvier
9514388108 tests: rename RoomMessagesResponse to RoomMessagesResponseTemplate 2025-01-13 14:50:21 +01:00
Benjamin Bouvier
e6dc10933c tests: add helper to delay a room /messages response
This removes a few manual uses of `ResponseTemplate`, which is sweet and
guarantees some better typing for those responses overall.
2025-01-13 14:50:21 +01:00
Benjamin Bouvier
c456356424 tests: add a helper to create a room /messages response 2025-01-13 14:50:21 +01:00
Benjamin Bouvier
5af326b36e fix(event cache): keep the previous-batch token when we haven't enabled storage 2025-01-13 14:50:21 +01:00
Jorge Martín
5548f38393 feat(ffi): Add FFI bindings for the new room privacy settings feature. 2025-01-13 11:29:10 +01:00
Jorge Martín
d9c1188f87 test(room): Add integration tests for publishing and removing room aliases 2025-01-13 11:29:10 +01:00
Jorge Martín
588702756b feat(room): Add fn RoomPrivacySettings::remove_room_alias_in_room_directory. 2025-01-13 11:29:10 +01:00
Jorge Martín
d6a74d389d feat(room): Add fn RoomPrivacySettings::publish_room_alias_in_room_directory.
This also needs some new mocks for resolving room aliases.
2025-01-13 11:29:10 +01:00
Jorge Martín
d807d71e22 feat(room): Add fn RoomPrivacySettings::update_room_visibility. 2025-01-13 11:29:10 +01:00
Jorge Martín
587545ae82 feat(room): Add fn RoomPrivacySettings::get_room_visibility. 2025-01-13 11:29:10 +01:00
Jorge Martín
49985e5476 feat(room): Add fn RoomPrivacySettings::update_join_rule. 2025-01-13 11:29:10 +01:00
Jorge Martín
4fbe79a27d feat(room): Add fn RoomPrivacySettings::update_room_history_visibility. 2025-01-13 11:29:10 +01:00
Jorge Martín
f61ad19ae6 feat(room): Add RoomPrivacySettings helper struct.
This can be accessed through `fn Room::privacy_settings` and will wrap the functionality related to a room's access and privacy settings.

This commit includes the `fn RoomPrivacySettings::update_canonical_alias` to modify the canonical alias of a room.
2025-01-13 11:29:10 +01:00
Benjamin Bouvier
c9a49006f6 chore(xtask): tweak the TWiM report to include only merged PRs, not created PRs
As an outsider, I am mostly interested in features and new developments
that have happened, not those that *may* happen. An open-but-not-merged
PR may not get merged in the end, or it may not get merged any time
soon, creating false expectations. Merged PRs, on the other hand, have
definitely happened (even if they get undone, that happens via other PRs
that will get merged later). As such, I think it brings more value to
outsiders.
2025-01-13 11:03:08 +01:00
Kévin Commaille
ca9eb70db5 Add PR link to changelog
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-01-13 08:46:10 +01:00
Kévin Commaille
f173aea6e4 feat(sdk): Expose Client::server_versions publicly
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
2025-01-13 08:46:10 +01:00
Jonas Platte
e37ad11b47 refactor(ui): Use RPITIT / AFIT for RoomDataProvider 2025-01-11 13:19:16 -05:00
Damir Jelić
d6c2a63f5c refactor: Use the simplified locks in the encryption tasks 2025-01-11 09:33:33 +01:00
Damir Jelić
4ebf5056be chore: Remove our ancient upgrade guide 2025-01-10 20:22:27 +01:00
Valere
a79d409f9d task(bindings): Expose withdraw_verification in UserIdentity 2025-01-10 15:18:12 +01:00