@@ -139,7 +139,6 @@ def _get_evaluator(
139139 * ,
140140 has_mentions : bool = False ,
141141 user_mentions : Optional [Set [str ]] = None ,
142- room_mention : bool = False ,
143142 related_events : Optional [JsonDict ] = None ,
144143 ) -> PushRuleEvaluator :
145144 event = FrozenEvent (
@@ -160,7 +159,6 @@ def _get_evaluator(
160159 _flatten_dict (event ),
161160 has_mentions ,
162161 user_mentions or set (),
163- room_mention ,
164162 room_member_count ,
165163 sender_power_level ,
166164 cast (Dict [str , int ], power_levels .get ("notifications" , {})),
@@ -221,27 +219,6 @@ def test_user_mentions(self) -> None:
221219 # Note that invalid data is tested at tests.push.test_bulk_push_rule_evaluator.TestBulkPushRuleEvaluator.test_mentions
222220 # since the BulkPushRuleEvaluator is what handles data sanitisation.
223221
224- def test_room_mentions (self ) -> None :
225- """Check for room mentions."""
226- condition = {"kind" : "org.matrix.msc3952.is_room_mention" }
227-
228- # No room mention shouldn't match.
229- evaluator = self ._get_evaluator ({}, has_mentions = True )
230- self .assertFalse (evaluator .matches (condition , None , None ))
231-
232- # Room mention should match.
233- evaluator = self ._get_evaluator ({}, has_mentions = True , room_mention = True )
234- self .assertTrue (evaluator .matches (condition , None , None ))
235-
236- # A room mention and user mention is valid.
237- evaluator = self ._get_evaluator (
238- {}, has_mentions = True , user_mentions = {"@another:test" }, room_mention = True
239- )
240- self .assertTrue (evaluator .matches (condition , None , None ))
241-
242- # Note that invalid data is tested at tests.push.test_bulk_push_rule_evaluator.TestBulkPushRuleEvaluator.test_mentions
243- # since the BulkPushRuleEvaluator is what handles data sanitisation.
244-
245222 def _assert_matches (
246223 self , condition : JsonDict , content : JsonMapping , msg : Optional [str ] = None
247224 ) -> None :
0 commit comments