summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-08-14 14:30:25 +0100
committerErik Johnston <erik@matrix.org>2014-08-14 14:30:25 +0100
commit6d6a1c3454ae787e3878202a8e41341ddcf7bee0 (patch)
tree1376ad1825e21a4a60b190141e862800111bc808 /synapse/storage/__init__.py
parentChange relative db paths to absolute paths in case we daemonize. (diff)
downloadsynapse-6d6a1c3454ae787e3878202a8e41341ddcf7bee0.tar.xz
Actually encode dicts as json in the DB
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index d38d613450..cd9acdc447 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -81,11 +81,11 @@ class DataStore(RoomDataStore, RoomMemberStore, MessageStore, RoomStore,
             "event_type", event.type,
             "sender": event.user_id,
             "room_id": event.room_id,
-            "content": event.content,
+            "content": json.dumps(event.content),
         }
 
         unrec = {k: v for k, v in event.get_full_dict() if k not in vals.keys()}
-        val["unrecognized_keys"] = unrec
+        val["unrecognized_keys"] = json.dumps(unrec)
 
         yield self._simple_insert("events", vals)