diff options
author | Erik Johnston <erik@matrix.org> | 2015-04-28 14:24:08 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-04-28 14:24:08 +0100 |
commit | 9fbcf191889b655d5c93d01a738e5137aa94a354 (patch) | |
tree | 8a403e4b27825447695fe09b54bb2440df734ed5 /synapse/push/pusherpool.py | |
parent | Merge pull request #126 from matrix-org/csauth (diff) | |
parent | Remove unused imports (diff) | |
download | synapse-9fbcf191889b655d5c93d01a738e5137aa94a354.tar.xz |
Merge pull request #123 from matrix-org/postgres
Postgres
Diffstat (limited to 'synapse/push/pusherpool.py')
-rw-r--r-- | synapse/push/pusherpool.py | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/synapse/push/pusherpool.py b/synapse/push/pusherpool.py index 041ce8f22a..58fe6ad747 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 @@ -131,7 +126,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, user_name) @@ -162,13 +157,13 @@ class PusherPool: resultlist = yield self.store.get_pushers_by_app_id_and_pushkey( app_id, pushkey ) + p = None for r in resultlist: if r['user_name'] == user_name: p = r if p: - p['data'] = json.loads(p['data']) self._start_pushers([p]) |