summary refs log tree commit diff
path: root/synapse/push/clientformat.py
diff options
context:
space:
mode:
authorPatrick Cloke <clokep@users.noreply.github.com>2022-05-24 09:23:23 -0400
committerGitHub <noreply@github.com>2022-05-24 13:23:23 +0000
commit88ce3080d4d064b9872c9867208116dc9db73d7e (patch)
treef267921f3747eead8109f1cf5e1fb9f35b249fc8 /synapse/push/clientformat.py
parentcontributing_guide.md: fix link to DCO (diff)
downloadsynapse-88ce3080d4d064b9872c9867208116dc9db73d7e.tar.xz
Experimental support for MSC3772 (#12740)
Implements the following behind an experimental configuration flag:

* A new push rule kind for mutually related events.
* A new default push rule (`.m.rule.thread_reply`) under an unstable prefix.

This is missing part of MSC3772:

* The `.m.rule.thread_reply_to_me` push rule, this depends on MSC3664 / #11804.
Diffstat (limited to 'synapse/push/clientformat.py')
-rw-r--r--synapse/push/clientformat.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/push/clientformat.py b/synapse/push/clientformat.py
index 63b22d50ae..5117ef6854 100644
--- a/synapse/push/clientformat.py
+++ b/synapse/push/clientformat.py
@@ -48,6 +48,10 @@ def format_push_rules_for_user(
             elif pattern_type == "user_localpart":
                 c["pattern"] = user.localpart
 
+            sender_type = c.pop("sender_type", None)
+            if sender_type == "user_id":
+                c["sender"] = user.to_string()
+
         rulearray = rules["global"][template_name]
 
         template_rule = _rule_to_template(r)