summary refs log tree commit diff
path: root/synapse/rest/client
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-18 14:39:43 +0000
committerErik Johnston <erik@matrix.org>2016-01-18 14:50:17 +0000
commit0e39dcd1352bcab53908fca574cae43a89e407f0 (patch)
treef85f9babf3aaecce2868c17779ec8f439ec25a30 /synapse/rest/client
parentDon't edit ruleset (diff)
downloadsynapse-0e39dcd1352bcab53908fca574cae43a89e407f0.tar.xz
Remove internal ids
Diffstat (limited to 'synapse/rest/client')
-rw-r--r--synapse/rest/client/v1/push_rule.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/synapse/rest/client/v1/push_rule.py b/synapse/rest/client/v1/push_rule.py
index 0cbd9fe08a..b176efd8a8 100644
--- a/synapse/rest/client/v1/push_rule.py
+++ b/synapse/rest/client/v1/push_rule.py
@@ -140,6 +140,10 @@ class PushRuleRestServlet(ClientV1RestServlet):
 
             template_name = _priority_class_to_template_name(r['priority_class'])
 
+            # Remove internal stuff.
+            for c in r["conditions"]:
+                c.pop("_id", None)
+
             if r['priority_class'] > PRIORITY_CLASS_MAP['override']:
                 # per-device rule
                 profile_tag = _profile_tag_from_conditions(r["conditions"])