45 Commits

Author SHA1 Message Date
Jonas Platte
d87874314b
events: Add 'Original' prefix to unredacted types with a redacted form 2022-04-05 14:29:17 +02:00
Jonas Platte
24bd27a3a9 Remove origin field from PDUs
It has been removed from the spec, for details see
https://github.com/matrix-org/matrix-spec/pull/998
2022-03-30 08:44:40 +02:00
Jonas Platte
ce785064a9
Use RoomEventType instead of EventType for PDUs and power levels 2022-03-16 12:20:17 +01:00
Kévin Commaille
088d1872b7
common: Merge ruma-identifiers into ruma-common 2022-03-09 17:46:51 +00:00
Kévin Commaille
c3f9a3cb70
common: Merge ruma-events into ruma-common 2022-03-04 11:45:07 +00:00
Kévin Commaille
acba6fbbc4
ci: Add the __ci feature 2022-02-11 22:17:49 +01:00
Jonas Platte
2706f24688
state-res: Move room version 8, 9 logic from unstable-pre-spec to unstable-spec 2022-02-01 21:37:11 +01:00
Jonas Platte
16f031fabb
state-res: Make the API generic over the event ID storage 2021-11-27 23:18:34 +01:00
Jonas Platte
9ed75241a6
state-res: Refactor lexicographical_topological_sort
Gets rid of unnecessary copying and makes things more explicit by using
a struct with named fields instead of a tuple for tie breaking.

Co-authored-by: Jonathan de Jong <jonathan@automatia.nl>
2021-11-26 20:22:57 +01:00
Jonas Platte
6b76d7813e
identifiers: Shorten RoomVersionId variant names 2021-11-26 01:07:26 +01:00
Jonas Platte
3ce578f384
identifiers: Make UserId a DST 2021-11-26 00:40:40 +01:00
Jonas Platte
2d4dbfe42f
identifiers: Make RoomId a DST 2021-11-26 00:04:28 +01:00
Jonas Platte
52608cc72c
identifiers: Make EventId a DST 2021-11-25 22:34:40 +01:00
Jonas Platte
56801780b6
Fix clippy lints 2021-10-29 23:11:24 +02:00
Jonas Platte
04080085f9
events: Include all event type segments in Rust type names 2021-10-02 21:25:21 +02:00
Amanda Graven
3b5f3cb5a6
events: Move JoinRulesEventContent.allow into JoinRules 2021-09-28 13:39:58 +00:00
Jonas Platte
a9985d7763
events / state-res: Use RawJsonValue over JsonValue for event content 2021-09-15 20:58:42 +02:00
Jonas Platte
9cb9b1104a
state-res: Remove unused Event trait methods 2021-09-15 18:15:01 +02:00
Jonas Platte
0999e420ae
state-res: Return borrowed content in Event method 2021-09-13 19:02:36 +02:00
Jonas Platte
889406b6c2
state-res: Make resolve more general by using impl IntoIterator for state_sets 2021-09-13 19:02:36 +02:00
Jonas Platte
3830dcddc2
state-res: Simplify tests a bit 2021-09-13 19:02:36 +02:00
Jonas Platte
a9a522ccfa
state-res: Fix benchmark 2021-09-13 19:02:36 +02:00
Jonas Platte
3b9bd1fc76
state-res: Simplify benchmark 2021-09-13 19:02:36 +02:00
Jonas Platte
1e19de9579
state-res: Return borrows from Event::{prev_events, auth_events} 2021-09-13 19:02:35 +02:00
Jonas Platte
34a10b87c5
state-res: Return borrows from Event::{event_type, state_key} 2021-09-13 19:02:35 +02:00
Jonas Platte
290c61820b
state-res: Remove unused function parameters 2021-09-13 19:02:35 +02:00
Jonas Platte
76fa15f248
state-res: Rename Event::kind to event_type 2021-09-13 19:02:33 +02:00
Jonas Platte
4bea59caef
state-res: Remove StateResolution type
… making its associated functions free instead.
2021-09-13 19:02:33 +02:00
Devin Ragotzy
318f3186ad
state-res: Replace unwraps with expect or errors 2021-08-10 15:22:47 +02:00
Devin Ragotzy
01515aea41
state-res: Fix clippy warnings 2021-08-10 15:22:47 +02:00
Timo Kösters
3a0ee7740f
state-res: Change BTreeMap/Set to HashMap/Set 2021-08-10 15:22:47 +02:00
Timo Kösters
d970501c85
state-res: Revert calculating the auth chain in ruma
In a previous commit I moved the auth chain calculation code to ruma
because I thought I could optimize it by only taking auth chains from
conflicted events instead of all events. It turned out that was wrong
and now I removed that algorithm again (the full auth chains are now
passed in as an argument to state_res::resolve again).
2021-08-10 15:22:47 +02:00
Timo Kösters
17afbabd92
state-res: Calculate auth_events and fix bug when calculating common events 2021-08-10 15:22:46 +02:00
Devin Ragotzy
a4e6cc7c42
state-res: Use closure to fetch unknown events during state-res
state-res: Remove event_map arg from all functions

state-res: Remove get_or_load_event helper func and fix resolve docs
2021-08-10 15:22:26 +02:00
Jonas Platte
4dfaad104b
Enable clippy lint str_to_string 2021-07-02 23:02:50 +02:00
Devin Ragotzy
fae5385753 state-res: Make all pub structs non_exhaustive 2021-06-18 20:53:06 +02:00
Devin Ragotzy
ce6fd1e65e
state-res: Use unique over dedup, remove Vec -> BTreeSet conversions 2021-06-17 19:43:21 +02:00
Jonas Platte
9e9696f091
Re-run cargo fmt 2021-05-15 15:41:23 +02:00
Jonas Platte
60d4ea027f
Use serde_json::Result alias 2021-05-15 15:02:02 +02:00
Jonas Platte
6c167fca38
state-res: Get rid of static mut 2021-05-14 01:40:23 +02:00
Jonas Platte
fe68bf0e07
Clean up json! formatting 2021-05-14 01:13:42 +02:00
Jonas Platte
5710d2740c
Replace uses of SystemTime with new UInt-based timestamp types 2021-05-14 01:13:17 +02:00
Jonas Platte
f58462a002
state-res: Depend on ruma-* subcrates instead of ruma 2021-05-08 00:52:50 +02:00
Jonas Platte
addc67051e
Integrate state-res and rename to ruma-state-res 2021-05-08 00:39:51 +02:00
Jonas Platte
6609829735 Add 'crates/ruma-state-res/' from commit '56bf45c0235701ac6df56993c327d2f97a499ef9'
git-subtree-dir: crates/ruma-state-res
git-subtree-mainline: 719433eb5c41fb5b8099481ce7bb0a37931b260f
git-subtree-split: 56bf45c0235701ac6df56993c327d2f97a499ef9
2021-05-08 00:20:05 +02:00