summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-11 17:32:42 +0000
committerErik Johnston <erik@matrix.org>2015-02-11 17:32:42 +0000
commite9e54449f5ff830c36c7ec6935e723ae68dca942 (patch)
tree3a692b3a4a70f3a7412e1b6a616e67b9a4b27057
parentUpdate dependency links (diff)
downloadsynapse-e9e54449f5ff830c36c7ec6935e723ae68dca942.tar.xz
Use encode_canonical_json for pushes
Diffstat (limited to '')
-rw-r--r--synapse/push/pusherpool.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py
index 7483d257bf..90babd7224 100644
--- a/synapse/push/pusherpool.py
+++ b/synapse/push/pusherpool.py
@@ -19,6 +19,8 @@ from twisted.internet import defer
 from httppusher import HttpPusher
 from synapse.push import PusherConfigException
 
+from syutil.jsonutil import encode_canonical_json
+
 import logging
 import simplejson as json
 
@@ -96,7 +98,7 @@ class PusherPool:
             pushkey=pushkey,
             pushkey_ts=self.hs.get_clock().time_msec(),
             lang=lang,
-            data=json.dumps(data)
+            data=encode_canonical_json(data).decode("UTF-8"),
         )
         self._refresh_pusher((app_id, pushkey))