Kévin Commaille
7ec331c842
testing: Create realistic modern event IDs in EventFactory
...
As a fallback when the ID is not provided when constructing the event.
It allows to work with data that looks like what we would get in
production, which is important for benchmarks.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2026-03-06 15:00:45 +01:00
Stefan Ceriu
17a9ab41e4
chore(tests): add event factory method for building MSC3672 beacon_info state events
2026-03-05 15:55:31 +02:00
Kévin Commaille
12b1102ca9
Upgrade Ruma after breaking change about Reply relations
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2026-03-04 10:30:25 +00:00
Kévin Commaille
81286ad1e7
Upgrade Ruma after breaking change about EventId constructors
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2026-03-04 10:30:25 +00:00
Valere Fedronic
cc8d6d8482
bindings: Support audio/video intent in rtc notification event content ( #6207 )
...
<!-- description of the changes in this PR -->
Updates ruma from
https://github.com/ruma/ruma/commit/289bee87974bd3c2ad14a6c15801c80b683b67dc
to
https://github.com/ruma/ruma/commit/89dab44660889ab02e5921adbf6b79a3262deb99
see
https://github.com/matrix-org/matrix-rust-sdk/pull/6207/commits/4250d657564039d21f63f2fbb954b0e2eb17d9eb
Depends on this ruma PR github.com/ruma/ruma/pull/2383
Support for reading the intent from the notification event
(m.call.intent in notification event as per
https://github.com/matrix-org/matrix-spec-proposals/pull/4075 )
Parity with js-sdk implementation
https://github.com/matrix-org/matrix-js-sdk/blob/bd6547c0814e11b41e79de3cc9d0d4ecf7648272/src/matrixrtc/types.ts#L150
- [ ] I've documented the public API Changes in the appropriate
`CHANGELOG.md` files.
- [ ] I've read [the `CONTRIBUTING.md`
file](https://github.com/matrix-org/matrix-rust-sdk/blob/main/CONTRIBUTING.md ),
notably the sections about Pull requests, Commit message format, and AI
policy.
- [ ] This PR was made with the help of AI.
<!-- Sign-off, if not part of the commits -->
<!-- See CONTRIBUTING.md if you don't know what this is -->
Signed-off-by:
2026-03-02 15:31:29 +01:00
Kévin Commaille
5d18820120
refactor: Use owned_*_id! macros rather than *_id!().to_owned()
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2026-02-23 14:29:55 +01:00
Kévin Commaille
1dbd2caeb2
testing: Remove once_cell dependency
...
Use the types that were stabilized in the standard library instead.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2026-02-23 10:10:14 +00: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
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
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
Benjamin Bouvier
079c8175f2
refactor(test): remove the PresenceTestEvent enum that's unused
2026-02-16 10:53:31 +01:00
Benjamin Bouvier
64163c32f6
refactor(test): add an invite_room_state method to the EventBuilder
...
So we can pass the room state when receiving an invite, using more event
factory!
2026-02-16 10:53:31 +01:00
Benjamin Bouvier
bcb84cc27c
refactor(test): remove StrippedStateTestEvent
2026-02-16 10:53:31 +01:00
Benjamin Bouvier
e299adbdeb
refactor(test): remove more unused test event variants
2026-02-16 10:53:31 +01:00
Benjamin Bouvier
2ab1d8a985
refactor(test): remove StateTestEvent \o/\o/\o/
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
d71387e7f7
refactor(test): remove StateTestEvent::Custom and replace it with usage of the event factory
...
There's one case where we want to create a custom join rule, and thus
must parse directly from JSON, but the rest can reuse helpers that
already exist.
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
fa638ae630
refactor(test): remove StateTestEvent::EncryptionWithEncryptedStateEvents
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
4965800a0a
refactor(test): remove StateTestEvent::RoomName and use the event factory instead
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
f7b55bfb5c
refactor(test): remove StateTestEvent::PowerLevels and use the event factory instead
...
Since it's always using the default power levels, provide a default ctor
for it, and use it throughout this commit.
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
1fdf23a456
refactor(test): remove StateTestEvent::MemberInvite/Leave
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
5c1ee281a9
refactor(test): remove StateTestEvent variants that were unused
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
f4b401ac58
refactor(test): remove StateTestEvent::MemberAdditional and use the EventFactory instead
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
47e4c44d1b
refactor(test): remove StateTestEvent::Member and use the event factory instead
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
1ba8704941
refactor(test): remove StateTestEvent::JoinRules
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
7f13f86912
refactor(test): remove StateTestEvent::HistoryVisibility
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
622825f099
refactor(test): remove StateTestEvent::Encryption
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
16e50ee484
refactor(test): remove StateTestEvent::Create and replace it with the event factory
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
7dc76fa423
refactor(test): remove StateTestEvent::Aliases which was simply unused
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
db3308981b
refactor(test): remove StateTestEvent::Alias and use the event factory instead
2026-02-16 10:26:11 +01:00
Benjamin Bouvier
e7d2c729c2
chore(test): remove unused test JSONs
2026-02-12 13:00:13 +01:00
Benjamin Bouvier
ce0bba5e6d
test: make more use of the EventFactory for the room topic
...
And get rid of test events. This implied adding a way to provide the
previous content of a state event, in the event factory.
2026-02-11 09:48:46 +01:00
Benjamin Bouvier
7fbb2ddae1
test: add a new method for the state pinned events in the event factory
2026-02-10 18:41:15 +01:00
Mauro Romito
a46b006473
refactor: added the check for the joined_members_count inside the test_leave
2026-01-20 08:41:49 +01:00
Andy Balaam
ca436016b4
base: Bump ruma to 91424b1fc
...
And update to reflect the new feature name unstable-msc4362, which
provides the new unstable prefix io.element.msc4362.encrypt_state_events
2025-11-18 11:10:55 +00:00
Damir Jelić
8f4267332a
test: Allow to create encrypted events in the event factory
2025-11-04 13:58:49 +01:00
Johannes Marbach
b60b042cfe
feat(testing): add mock for get device endpoint
...
Signed-off-by: Johannes Marbach <n0-0ne+github@mailbox.org >
2025-10-29 20:37:22 +01:00
Kévin Commaille
cb3d281f8f
Upgrade Ruma after removal of legacy mention push rules
...
The legacy mention push rules were removed, and the
`contains_display_name` condition was deprecated.
Some tests check for backwards-compatibility with legacy mentions, so we
need to add them back for those tests.
A test with an encrypted event was relying on the legacy mentions, so
the encrypted event was replaced with another one with an intentional
mention.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-10-09 15:08:38 +01:00
Benjamin Bouvier
7fbc4144b1
feat(timeline): allow a poll edit to be an embedded event
...
This will properly show edited polls as the latest thread id, as a nice
benefit.
2025-10-06 14:05:34 +02:00
Kévin Commaille
2b69a7f741
feat(sdk-test): Add conversions to deserialized types for EventBuilder
...
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-10-03 17:01:58 +02:00
Kévin Commaille
fbafae42bb
refactor(tests): Replace uses of EventBuilder::into_raw
...
We actually want other event formats in those cases, and in most cases
just using `.into()` is enough to generate the proper format.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-10-03 15:22:25 +02:00
Kévin Commaille
08563d4096
refactor(sdk-test): Use enum to represent possible event formats of EventBuilder
...
And use the proper fields for these formats. We also add more conversion
implementations for the types associated with these formats.
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr >
2025-10-03 15:22:25 +02:00
Alexis Loiseau
0a0e31af83
feat(ui): add custom events to timeline when explicitly filtered
...
This allows custom message-like events (created by the `EventContent` macro from ruma) to be added to the timeline if they are explicitly allowed when building the timeline with a custom `event_filter`.
The custom event content is not available directly to the consumer, but it can still fetch it from the matrix-sdk client with its `event_id`, or display a "this type of event is not supported".
Signed-off-by: Itess <me@aloiseau.com >
Fixes #5598 .
2025-09-24 15:50:50 +00:00