summary refs log tree commit diff
path: root/stubs/synapse
diff options
context:
space:
mode:
authorEric Eastwood <erice@element.io>2022-09-30 20:24:39 -0500
committerEric Eastwood <erice@element.io>2022-09-30 20:24:39 -0500
commit4a495ac43b093eb5e223b64ab5bc033233ab83b9 (patch)
treea656afce9494d347c1cf960fe941e2d842ea2422 /stubs/synapse
parentMerge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry (diff)
parentClarifications in user directory for users who share rooms tracking (#13966) (diff)
downloadsynapse-4a495ac43b093eb5e223b64ab5bc033233ab83b9.tar.xz
Merge branch 'develop' into madlittlemods/11850-migrate-to-opentelemetry
Conflicts:
	synapse/handlers/message.py
	synapse/logging/opentracing.py
Diffstat (limited to 'stubs/synapse')
-rw-r--r--stubs/synapse/synapse_rust/push.pyi19
1 files changed, 18 insertions, 1 deletions
diff --git a/stubs/synapse/synapse_rust/push.pyi b/stubs/synapse/synapse_rust/push.pyi
index 93c4e69d42..fffb8419c6 100644
--- a/stubs/synapse/synapse_rust/push.pyi
+++ b/stubs/synapse/synapse_rust/push.pyi
@@ -1,4 +1,4 @@
-from typing import Any, Collection, Dict, Mapping, Sequence, Tuple, Union
+from typing import Any, Collection, Dict, Mapping, Optional, Sequence, Set, Tuple, Union
 
 from synapse.types import JsonDict
 
@@ -35,3 +35,20 @@ class FilteredPushRules:
     def rules(self) -> Collection[Tuple[PushRule, bool]]: ...
 
 def get_base_rule_ids() -> Collection[str]: ...
+
+class PushRuleEvaluator:
+    def __init__(
+        self,
+        flattened_keys: Mapping[str, str],
+        room_member_count: int,
+        sender_power_level: Optional[int],
+        notification_power_levels: Mapping[str, int],
+        relations: Mapping[str, Set[Tuple[str, str]]],
+        relation_match_enabled: bool,
+    ): ...
+    def run(
+        self,
+        push_rules: FilteredPushRules,
+        user_id: Optional[str],
+        display_name: Optional[str],
+    ) -> Collection[dict]: ...