summary refs log tree commit diff
path: root/synapse/push
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-04-16 11:01:09 +0100
committerErik Johnston <erik@matrix.org>2015-04-16 11:01:09 +0100
commitbc9e69e16099142acdb06c3ea7c7ef9aec9e4ec9 (patch)
tree568ca9520c7eea5b00a90ea305bfc495e7ee85b1 /synapse/push
parentRemove mysql/maria support (diff)
downloadsynapse-bc9e69e16099142acdb06c3ea7c7ef9aec9e4ec9.tar.xz
Move encoding and decoding of JSON into storage layer
Diffstat (limited to 'synapse/push')
-rw-r--r--synapse/push/pusherpool.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py
index 90babd7224..7f3dd50b47 100644
--- a/synapse/push/pusherpool.py
+++ b/synapse/push/pusherpool.py
@@ -19,10 +19,7 @@ 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
 
 logger = logging.getLogger(__name__)
 
@@ -52,8 +49,6 @@ class PusherPool:
     @defer.inlineCallbacks
     def start(self):
         pushers = yield self.store.get_all_pushers()
-        for p in pushers:
-            p['data'] = json.loads(p['data'])
         self._start_pushers(pushers)
 
     @defer.inlineCallbacks
@@ -98,7 +93,7 @@ class PusherPool:
             pushkey=pushkey,
             pushkey_ts=self.hs.get_clock().time_msec(),
             lang=lang,
-            data=encode_canonical_json(data).decode("UTF-8"),
+            data=data,
         )
         self._refresh_pusher((app_id, pushkey))
 
@@ -129,7 +124,6 @@ class PusherPool:
         p = yield self.store.get_pushers_by_app_id_and_pushkey(
             app_id_pushkey
         )
-        p['data'] = json.loads(p['data'])
 
         self._start_pushers([p])