summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-12-16 13:17:09 +0000
committerErik Johnston <erik@matrix.org>2014-12-16 13:17:09 +0000
commit882dc8dcab434d24b0e902be3b4545ceabe9bdbe (patch)
treecc3f35fc5609c983cc56d2ae48628bcb7522f103 /synapse/storage/__init__.py
parentAdd basic docstring to annotate_context_with_state (diff)
downloadsynapse-882dc8dcab434d24b0e902be3b4545ceabe9bdbe.tar.xz
Persist internal_metadata
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 5c079da5ba..26f205ae8f 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -156,12 +156,17 @@ class DataStore(RoomMemberStore, RoomStore,
             ]
         }
 
+        metadata_json =  encode_canonical_json(
+            event.internal_metadata.get_dict()
+        )
+
         self._simple_insert_txn(
             txn,
             table="event_json",
             values={
                 "event_id": event.event_id,
                 "room_id": event.room_id,
+                "internal_metadata": metadata_json.decode("UTF-8"),
                 "json": encode_canonical_json(event_dict).decode("UTF-8"),
             },
             or_replace=True,