104 Commits

Author SHA1 Message Date
Devin Ragotzy
a0177669e6 Fix all failing tests because of state_key unwraps 2021-03-26 16:05:12 -04:00
Timo Kösters
625c37cb77
Fix room version updates 2021-03-26 10:53:20 +01:00
Timo Kösters
1621a491a9
improvement: refactor code and fix a few auth rules 2021-03-25 23:19:20 +01:00
Timo Kösters
34cd1cb4dc bump ruma 2021-03-18 14:30:21 -04:00
Timo Kösters
da5c74acc3 fix: event required power levels 2021-03-18 14:30:21 -04:00
Devin Ragotzy
d34a78c5b6 Update ruma to allow optional state_key in InitialStateEvent 2021-02-08 09:38:04 -05:00
Devin Ragotzy
791c66d73c Replace tracing crate with log (conduit uses log) 2021-01-29 11:18:01 -05:00
Devin Ragotzy
3c27c8b448 Update ruma and itertools 2021-01-29 10:39:14 -05:00
Devin Ragotzy
594082cbda Update readme to how the library is set up now 2021-01-24 20:56:04 -05:00
Devin Ragotzy
8265247f7a Update ruma to latest ruma-signatures got an update 2021-01-24 20:44:41 -05:00
Devin Ragotzy
4cb7353161 Remove outdated TODOs 2021-01-24 20:44:41 -05:00
Devin Ragotzy
d7144e63b7 Update resolve methods docs for event_map 2021-01-24 20:44:41 -05:00
Devin Ragotzy
37bff47a8e Add clearer docs to auth_check 2021-01-24 20:44:41 -05:00
Devin Ragotzy
47b19fdc15 Remove StateStore trait, caller must collect all events needed 2021-01-24 20:44:41 -05:00
Devin Ragotzy
f4772e0fcb Make auth_events arg for auth_check be a ref, cleanup 2021-01-05 15:43:55 -05:00
Devin Ragotzy
b0ee71e401 Make event_map &mut and take fields in membership_change 2021-01-05 15:43:55 -05:00
Devin Ragotzy
94be5b0fef Update ruma and serde to latest 2021-01-05 15:43:55 -05:00
Devin Ragotzy
da14be3000 Fix tests to work with PDU event trait 2021-01-05 15:43:55 -05:00
Devin Ragotzy
9721042198 Turn pdu into trait to avoid having our own PDU type 2021-01-05 15:43:55 -05:00
Devin Ragotzy
05a4dd1bf0 Convert state-res to use possible ruma::ServerPdu 2021-01-05 15:43:55 -05:00
Devin Ragotzy
5299679c21 Use ruma::ServerPdu instead of local type 2021-01-05 15:43:55 -05:00
Devin Ragotzy
282270ed4f Start work on db less state-res 2021-01-05 15:43:55 -05:00
Devin Ragotzy
611d1a3d9c Add tests for resolve_incoming 2021-01-05 15:43:55 -05:00
Devin Ragotzy
dd2a115b94 Clean up tests, move setup into its own file 2021-01-05 15:43:55 -05:00
Devin Ragotzy
33bb319b45 Fix failing tests because clean overwrites resolved_state in resolve fn 2021-01-05 15:43:55 -05:00
Devin Ragotzy
55e889a11f Add method to resolve batches of conflicted events 2021-01-05 15:43:55 -05:00
Devin Ragotzy
dca71f76ee Update readme example Option<String> -> String 2020-12-13 09:12:14 -05:00
Devin Ragotzy
c6a108631d Add apply_event function testing if a given event will pass auth 2020-12-11 18:04:41 -08:00
Devin Ragotzy
ea7dc52daf Bump ruma to be even with conduit 2020-12-11 18:04:41 -08:00
Devin Ragotzy
6c26da97a6 Bump deps and remove js_int now imported from ruma 2020-12-11 18:04:41 -08:00
Devin Ragotzy
89cfb1967a Update ruma to latest, StateEvent is still enum without Stub 2020-12-11 18:04:41 -08:00
Devin Ragotzy
0e9332c04f Add text file to keep track of benches from time to time 2020-12-11 18:04:41 -08:00
Devin Ragotzy
db3f68626d Add constructor from CanonicalJsonObject to StateEvent 2020-12-11 18:04:41 -08:00
Devin Ragotzy
b04c74ce88 Add more comments and cleanup out of date comments 2020-12-11 18:04:41 -08:00
Devin Ragotzy
f45cb2963a Fix formatting and grouping of state_event items 2020-12-11 18:04:41 -08:00
Devin Ragotzy
471ae2cbb4 Make from_id_value take 2 args not tuple 2020-12-11 18:04:41 -08:00
Devin Ragotzy
d5870c6cc0 Fix serialization test adding event_id field to the JSON string output 2020-12-11 18:04:41 -08:00
Devin Ragotzy
d0d2f77998 Add from_id_value associated method to create a StateEvent from id+json 2020-12-11 18:04:41 -08:00
Devin Ragotzy
5e7f60e5d9 Add gen-eventid feature to generate EventId every deserialize
So we do not rely on any found EventId, this makes all the tests break.
2020-12-11 18:04:41 -08:00
Devin Ragotzy
ac4ab7ac06 Update tests to new StateEvent using Pdu::RoomV3Pdu 2020-12-11 18:04:41 -08:00
Devin Ragotzy
6661771b31 StateEvent now holds EventId in variant + custom ser/de 2020-12-11 18:04:41 -08:00
Devin Ragotzy
420b7c00e8 Fix travis CI test by turning on features 2020-12-11 18:04:41 -08:00
Devin Ragotzy
ac9282add6 Allow get_power_level_for_sender to soft fail when eventId not found
Hardcode RoomVersion6 into the eventId hashing
2020-12-11 18:04:41 -08:00
Devin Ragotzy
c3ba1e33eb Use unstable-join branch of ruma from my fork 2020-12-11 18:04:41 -08:00
Devin Ragotzy
26b0f738a5 Fix unstable-pre-spec for federation membership join 2020-12-11 18:04:41 -08:00
Devin Ragotzy
11e8856a91 Fix tests after state_key = String from Option<String> 2020-12-11 18:04:41 -08:00
Devin Ragotzy
d19c0d4129 Rebase with timos changes and update/pin ruma 2020-12-11 18:04:41 -08:00
Devin Ragotzy
ee6aa35612 StateEvent's event_id method must return owned EventId 2020-12-11 18:04:41 -08:00
Timo Kösters
369703a6fa Expect all state events to have a state key 2020-12-11 18:04:41 -08:00
Timo Kösters
776c476f3c Skip events that fail auth 2020-12-11 18:04:41 -08:00