This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +1
-10
lines changed
Expand file tree Collapse file tree 2 files changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -142,14 +142,8 @@ impl PushRuleEvaluator {
142142 ) -> Result < bool , Error > {
143143 let known_condition = match condition {
144144 Condition :: Known ( known) => known,
145-
146- // XXX This looks incorrect -- we have reached an unknown condition
147- // kind and are unconditionally returning that it matches. Note that
148- // it seems possible to provide a condition to the /pushrules
149- // endpoint with an unknown kind, see
150- // _rule_tuple_from_request_object.
151145 Condition :: Unknown ( _) => {
152- return Ok ( true ) ;
146+ return Ok ( false ) ;
153147 }
154148 } ;
155149
Original file line number Diff line number Diff line change @@ -305,9 +305,6 @@ def test_relation_match(self) -> None:
305305 evaluator = self ._get_evaluator (
306306 {}, {"m.annotation" : {("@user:test" , "m.reaction" )}}
307307 )
308- condition = {"kind" : "relation_match" }
309- # Oddly, an unknown condition always matches.
310- self .assertTrue (evaluator .matches (condition , "@user:test" , "foo" ))
311308
312309 # A push rule evaluator with the experimental rule enabled.
313310 evaluator = self ._get_evaluator (
You can’t perform that action at this time.
0 commit comments