gnieto fca0f6a22b
Minor fix on join member auth rules
Previous code was not checking/enforcing rule 4.3.1
(https://spec.matrix.org/v1.2/rooms/v9/), which states that a room
member event (with a join membership) must be accepted only if it contains
a previous event which `state_key` is the room creator.

On top of that, it simplifies the public interface for `auth_rules`,
removing the need of (externally) compute `prev_event`, which, as a side
effect, should reduce the amount of times the previous event needs to be
fetched: It will only load it if the authorized event is a `m.room_member`
with a `Join` state.

Finally, I've splitted the join conditions so it's (hopefully) more
readable and apply auth rules in the same order as they
appear in the spec.
2022-03-08 08:27:47 +01:00

54 lines
1.1 KiB
Markdown

# [unreleased]
Breaking changes:
* `auth_check` does not require `prev_event` parameter. It was only required on
some specific cases. Previous event is now calculated on demand only when
it's required.
# 0.6.0
Breaking changes:
* Upgrade dependencies
# 0.5.0
Breaking changes:
* Remove some trait methods from `Event`
* Update `Event::content` signature to return `&RawJsonValue` instead of `&JsonValue`
* The `key_fn` in `lexicographical_topological_sort` has removed the event ID from its return type
and changed to expect just the power level, not the negated power level
# 0.4.1
Improvements:
* Improve performance of `StateResolution::separate`
# 0.4.0
Breaking changes:
* Change the way events are supplied
# 0.3.0
Breaking changes:
* state_res::resolve auth_events type has been slightly changed and renamed to auth_chain_sets
* state_res::resolve structs were changed from BTreeMap/Set to HashMap/Set
* Upgrade dependencies
# 0.2.0
Breaking changes:
* Replace `Vec` by `BTreeSet` in parts of the API
* Replace `event_map` argument with a closure to fetch events on demand
# 0.1.0
Initial release