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
Timo Kösters
33232f0a63
Disable buggy auth_events check
2020-12-11 18:04:41 -08:00
Timo Kösters
ad4fb6420a
Various improvements
2020-12-11 18:04:41 -08:00
Timo Kösters
f587b88a60
Fixes
2020-12-11 18:04:41 -08:00
Devin Ragotzy
acd829336e
If no power_level event default to 0 power_level for user
2020-09-08 16:59:29 -04:00
Devin Ragotzy
8ca1726e98
Remove RedactAllowed enum in favor of bool
2020-09-01 15:14:09 -04:00
Devin Ragotzy
3cc4ae2bf7
Remove the last few synapse-ism using only spec event auth
2020-08-31 14:53:20 -04:00
Devin Ragotzy
1eb89941b7
Rename power_event -> control_event and add more docs
2020-08-31 07:21:30 -04:00
Devin Ragotzy
8dbd9aae0b
Add error type, more docs, and conduit sorting test
...
Not resolve sorting just topo/mainline
2020-08-29 16:33:40 -04:00
q-b
e3de44ef2f
Fix StateStore get_event() signature in README
...
5f77bc11a2
2020-08-29 15:18:03 -04:00
Devin Ragotzy
394d26744a
Use own Error type for all errors
2020-08-27 20:03:19 -04:00
Devin Ragotzy
b846aec94a
Replace membership auth with timo's logic
2020-08-27 15:46:36 -04:00
Devin Ragotzy
aadccdee64
Fix DM room creator rejoining
...
Check only the previous event is a RoomCreate event not that one exists
2020-08-27 09:08:52 -04:00
Devin Ragotzy
17958665f6
Update docs in event_auth and add first few event_auth tests
2020-08-26 20:51:39 -04:00
Devin Ragotzy
fbcd26c6d2
All of event_auth follows the spec strictly, all the synapse-isms removed
2020-08-26 20:08:48 -04:00
Devin Ragotzy
025c2df752
Allow join room creator only if create event has no prev_events
2020-08-26 11:04:30 -04:00
Devin Ragotzy
36cec22cf3
Follow spec for is_membership_change_allowed
...
Add checks for caller in room and remove unspec'ed synapse check leave
-> join with join_rule = invite
2020-08-26 10:45:06 -04:00
Devin Ragotzy
e8acae05ff
Add test testing conduits event sorting logic
...
This could possibly be turned into another public function for exporting.
A list of ruma::Pdu (events) and another list of ruma::Pdu (auth_events)
and returns the sorted list of events.
2020-08-26 07:10:47 -04:00
Devin Ragotzy
63be0b550f
Add room version check to event auth and room_version to StateEvent
2020-08-22 06:36:22 -04:00
Devin Ragotzy
07807974f7
Update readme add docs
2020-08-21 07:39:02 -04:00
Devin Ragotzy
43e0f20d3b
Remove self param from all StateResolution methods
2020-08-20 17:43:04 -04:00
Devin Ragotzy
4e9b428c0d
Add depth getter to StateEvent
2020-08-18 16:06:18 -04:00
Devin Ragotzy
bafc2016c6
Add origin getter to StateEvent
2020-08-18 16:03:24 -04:00
Devin Ragotzy
8650f8fea7
Add hashes getter to StateEvent
2020-08-18 16:00:13 -04:00
Devin Ragotzy
ce2d5a0d9b
Add license, update readme and add docs for event_auth functions
2020-08-18 13:46:14 -04:00
Devin Ragotzy
789c814089
Update ruma to latest
2020-08-15 13:32:48 -04:00
Devin Ragotzy
85693cc30a
Update signatures since Cargo.lock seemed to be using cached ruma
2020-08-14 20:29:15 -04:00