Commit Graph

14497 Commits

Author SHA1 Message Date
Jorge Martín 11f2bf0ad6 refactor: Minor improvements, some extra comments 2026-02-19 17:04:57 +01:00
Jorge Martín 54e4cb2d10 refactor: Rename CrossProcessStoreConfig into CrossProcessLockConfig, move it into matrix_sdk_common::cross_process_lock and use it inside CrossProcessLock instead of the previous lock_holder: Option<String> 2026-02-19 17:04:57 +01:00
Jorge Martín 855bdadbad doc: Fix example in docs 2026-02-19 17:04:57 +01:00
Jorge Martín 287049c719 refactor: Rename CrossProcessStoreMode to CrossProcessStoreConfig 2026-02-19 17:04:57 +01:00
Jorge Martín 12e377d296 refactor: Make CrossProcessLock act as a no-op implementation when no lock_holder is present 2026-02-19 17:04:57 +01:00
Jorge Martín 4f7f4a054f doc: More doc fixes 2026-02-19 17:04:57 +01:00
Jorge Martín c18b1cfab9 fix: Fix weird rebase issue 2026-02-19 17:04:57 +01:00
Jorge Martín d6b6eb9e31 doc: Fix documentation mentioning the removed cross process lock holder name 2026-02-19 17:04:57 +01:00
Jorge Martín 52981a839a refactor(sdk): Try making IndexedDB use CrossProcessStoreMode 2026-02-19 17:04:57 +01:00
Jorge Martín 50b1e3baf2 refactor: Use the new APIs everywhere 2026-02-19 17:04:57 +01:00
Jorge Martín 3169c65bf2 refactor(ui): Make NotificationClient use the new CrossProcessStoreMode internally 2026-02-19 17:04:57 +01:00
Jorge Martín 1b724f288f refactor(ffi): Allow creating Client instances with cross-process store mode 2026-02-19 17:04:57 +01:00
Jorge Martín def89d2661 refactor(sdk): Allow creating Client instances with cross-process store mode 2026-02-19 17:04:57 +01:00
Jorge Martín d0cce0eafe refactor(sdk-base): Allow passing a cross-process store mode for BaseClient::clone_with_in_memory_state_store 2026-02-19 17:04:57 +01:00
Jorge Martín 901e280d5c refactor(sdk-common): Allow creating dummy CrossProcessLockGuard for the CrossProcessStoreMode::SingleProcess case 2026-02-19 17:04:57 +01:00
Jorge Martín a44dc4b70c refactor(ui): Simplify EncryptionSyncService by getting rid of WithLocking, we can use CrossProcessStoreMode instead 2026-02-19 17:04:57 +01:00
Jorge Martín 7d474c1415 refactor(sdk-base): Make cross_process_lock optional for MediaStoreLock 2026-02-19 17:04:57 +01:00
Jorge Martín f95d174d9a refactor(sdk-base): Make cross_process_lock optional for EventCacheStoreLock 2026-02-19 17:04:57 +01:00
Jorge Martín 4fe4e9cb7c refactor(sdk-base): Add CrossProcessStoreMode to make cross-process lock optional 2026-02-19 17:04:57 +01:00
Ivan Enderlin 209595e66e doc: Add another checkbox about AI policy in pull_request_template.md
This patch adds a new checkbox to ensure the user has read the `CONTRIBUTING.md` file, notably the Pull requests, Commit message format, and AI policy Sections.

Signed-off-by: Ivan Enderlin <ivan@mnt.io>
2026-02-19 16:29:17 +01:00
Benjamin Bouvier 7e69880148 test: make the introduced test more resilient to races
This avoids the sleep statement by only listening to the room's event
cache, instead of listening to the background send task and then wait
for it to save the sent event in the room cache. The test is more
resilient this way.
2026-02-19 14:56:31 +01:00
Benjamin Bouvier ad1e93473d fix(event cache): don't include our own events when computing non_empty_all_duplicates
See the new paragraph in the code comment around
`non_empty_all_duplicates`.
2026-02-19 14:56:31 +01:00
Benjamin Bouvier 449fbd3ad4 test(send queue): don't ditch gaps if the sync response included only our own events 2026-02-19 14:56:31 +01:00
Benjamin Bouvier a6663718d0 refactor(event factory): simplify tag() helper 2026-02-18 10:57:04 +01:00
Benjamin Bouvier 72c6dc8e08 refactor(test): get rid of RoomAccountDataTestEvent 2026-02-18 10:57:04 +01:00
Benjamin Bouvier 961edaf4b9 test(spaces): add an EventFactory method to create an m.space_order event 2026-02-18 10:57:04 +01:00
Benjamin Bouvier ea0a81989a refactor(test): replace usage of custom JSON with EventFactory::tag() 2026-02-18 10:57:04 +01:00
Benjamin Bouvier b68c22bd56 refactor(test): replace usage of MarkedUnread with EventFactory::marked_unread() in tests 2026-02-18 10:57:04 +01:00
Benjamin Bouvier 130e3ad04b refactor(test): replace RoomAccountDataTestEvent in read_receipts.rs 2026-02-18 10:57:04 +01:00
Benjamin Bouvier 9252c72dea test(timeline): replace FullyRead with EventFactory 2026-02-18 10:57:04 +01:00
Benjamin Bouvier 6d2f787623 test(sync_builder): make add_account_data accept impl Into<Raw<...>>
Change JoinedRoomBuilder::add_account_data() to accept any type that
implements Into<Raw<AnyRoomAccountDataEvent>>, preparing for migration
away from RoomAccountDataTestEvent enum.
2026-02-18 10:57:04 +01:00
Benjamin Bouvier e3042e664b test: delete sync_events.rs
Remove the sync_events module entirely now that all usages have been
migrated to EventFactory.
2026-02-18 10:57:04 +01:00
Benjamin Bouvier e401ece78f test(room): use the EventFactory::member function instea of the fixture MEMBER event 2026-02-18 10:57:04 +01:00
Benjamin Bouvier e79654c80b test(client): replace POWER_LEVELS, NAME, TAG with EventFactory 2026-02-18 10:57:04 +01:00
Benjamin Bouvier 0777425a73 test(notification): replace POWER_LEVELS with EventFactory 2026-02-18 10:57:04 +01:00
Benjamin Bouvier e83d085e77 test(state_store): replace sync_events usages with EventFactory 2026-02-18 10:57:04 +01:00
Benjamin Bouvier 026acf7f45 test(indexeddb): replace MEMBER_INVITE/BAN/STRIPPED with EventFactory 2026-02-18 10:57:04 +01:00
Benjamin Bouvier ed4454fcbb test(event_factory): add presence() helper and PresenceBuilder 2026-02-18 10:57:04 +01:00
Benjamin Bouvier 3749c9c616 test(event_factory): add tag() helper for m.tag events 2026-02-18 10:57:04 +01:00
Benjamin Bouvier b95b0ba1c4 test(event_factory): add room account data support
Add support for room account data events in EventFactory:
- Add RoomAccountData format to EventFormat enum
- Add From implementations for Raw<AnyRoomAccountDataEvent>
- Add room_account_data() generic method
- Add fully_read() helper for m.fully_read events
- Add marked_unread() helper for m.marked_unread events
2026-02-18 10:57:04 +01:00
Benjamin Bouvier 4c6d5f9654 test: replace ENCRYPTION_CONTENT usages with EventFactory
Replace all usages of ENCRYPTION_CONTENT and
ENCRYPTION_WITH_ENCRYPTED_STATE_EVENTS_CONTENT static values
with EventFactory::room_encryption().into_content() calls.

This uses the new into_content() method to get just the event
content for HTTP response mocking.
2026-02-18 10:57:04 +01:00
Benjamin Bouvier 6b99f37268 test(event_factory): add into_content() method to EventBuilder
Add a generic method to EventBuilder that returns just the event
content as a serde_json::Value. This is useful when mocking HTTP
responses that return event content rather than full events.
2026-02-18 10:57:04 +01:00
Benjamin Bouvier 818d0ef233 test: remove unused static JSON values from sync_events.rs 2026-02-18 10:57:04 +01:00
Jonas Jelten 2022017b29 feat(ffi): export is_low_priority for a room
Signed-off-by: Jonas Jelten <jj@sft.lol>
2026-02-17 15:23:26 +01:00
Hugh Nimmo-Smith 3c13b3edd4 test(qr-login): assert expect error codes in grant test cases 2026-02-17 13:01:13 +01:00
Johannes Marbach 3bd3ba7aff fix(latest_event): handle edits when the target event is not directly preceding
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org>
2026-02-17 10:12:21 +01:00
dependabot[bot] 9c6a3d6cf4 chore(deps): bump tj-actions/changed-files from 47.0.1 to 47.0.2
Bumps [tj-actions/changed-files](https://github.com/tj-actions/changed-files) from 47.0.1 to 47.0.2.
- [Release notes](https://github.com/tj-actions/changed-files/releases)
- [Changelog](https://github.com/tj-actions/changed-files/blob/main/HISTORY.md)
- [Commits](https://github.com/tj-actions/changed-files/compare/v47.0.1...v47.0.2)

---
updated-dependencies:
- dependency-name: tj-actions/changed-files
  dependency-version: 47.0.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-16 16:56:12 +01:00
dependabot[bot] 86ae50d1bd chore(deps): bump crate-ci/typos from 1.43.4 to 1.43.5
Bumps [crate-ci/typos](https://github.com/crate-ci/typos) from 1.43.4 to 1.43.5.
- [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.43.4...v1.43.5)

---
updated-dependencies:
- dependency-name: crate-ci/typos
  dependency-version: 1.43.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-02-16 16:56:03 +01:00
Benjamin Bouvier 347d348bf4 fix(bench): add a sender to the room encryption event 2026-02-16 10:53:31 +01:00
Benjamin Bouvier 079c8175f2 refactor(test): remove the PresenceTestEvent enum that's unused 2026-02-16 10:53:31 +01:00