summary refs log tree commit diff
path: root/synapse/app
diff options
context:
space:
mode:
authorErik Johnston <erikj@jki.re>2017-04-07 09:39:52 +0100
committerGitHub <noreply@github.com>2017-04-07 09:39:52 +0100
commit98ce212093bbe87c8cd2b5c92ee1587aba5cc1fa (patch)
treea6d9b00000e962c0a7e87bfe3d4a498f3f825641 /synapse/app
parentUse iteritems (diff)
parentDocument types of the replication streams (diff)
downloadsynapse-98ce212093bbe87c8cd2b5c92ee1587aba5cc1fa.tar.xz
Merge pull request #2103 from matrix-org/erikj/no-double-encode
Don't double encode replication data
Diffstat (limited to 'synapse/app')
-rw-r--r--synapse/app/federation_sender.py4
-rw-r--r--synapse/app/synchrotron.py4
2 files changed, 2 insertions, 6 deletions
diff --git a/synapse/app/federation_sender.py b/synapse/app/federation_sender.py
index cbddc80ca9..145c01f3a3 100644
--- a/synapse/app/federation_sender.py
+++ b/synapse/app/federation_sender.py
@@ -51,7 +51,6 @@ from daemonize import Daemonize
 import sys
 import logging
 import gc
-import ujson as json
 
 logger = logging.getLogger("synapse.app.appservice")
 
@@ -290,8 +289,7 @@ class FederationSenderHandler(object):
             # Parse the rows in the stream
             for row in rows:
                 typ = row.type
-                content_js = row.data
-                content = json.loads(content_js)
+                content = row.data
 
                 if typ == send_queue.PRESENCE_TYPE:
                     destination = content["destination"]
diff --git a/synapse/app/synchrotron.py b/synapse/app/synchrotron.py
index 67d9210f2a..d39e3161fe 100644
--- a/synapse/app/synchrotron.py
+++ b/synapse/app/synchrotron.py
@@ -62,7 +62,6 @@ import sys
 import logging
 import contextlib
 import gc
-import ujson as json
 
 logger = logging.getLogger("synapse.app.synchrotron")
 
@@ -254,9 +253,8 @@ class SynchrotronTyping(object):
         self._latest_room_serial = token
 
         for row in rows:
-            typing = json.loads(row.user_ids)
             self._room_serials[row.room_id] = token
-            self._room_typing[row.room_id] = typing
+            self._room_typing[row.room_id] = row.user_ids
 
 
 class SynchrotronApplicationService(object):