Implement MSC3966: Add a push rule condition to search for a value in an array. (#15045)

The `exact_event_property_contains` condition can be used to
search for a value inside of an array.
This commit is contained in:
Patrick Cloke 2023-02-14 14:02:19 -05:00 committed by GitHub
parent 157c571f3e
commit 119e0795a5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 176 additions and 42 deletions

View file

@ -71,6 +71,7 @@ MutableStateMap = MutableMapping[StateKey, T]
# JSON types. These could be made stronger, but will do for now.
# A "simple" (canonical) JSON value.
SimpleJsonValue = Optional[Union[str, int, bool]]
JsonValue = Union[List[SimpleJsonValue], Tuple[SimpleJsonValue, ...], SimpleJsonValue]
# A JSON-serialisable dict.
JsonDict = Dict[str, Any]
# A JSON-serialisable mapping; roughly speaking an immutable JSONDict.