summary refs log tree commit diff
path: root/synapse/storage/_base.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/_base.py
parentAdd basic docstring to annotate_context_with_state (diff)
downloadsynapse-882dc8dcab434d24b0e902be3b4545ceabe9bdbe.tar.xz
Persist internal_metadata
Diffstat (limited to 'synapse/storage/_base.py')
-rw-r--r--synapse/storage/_base.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/storage/_base.py b/synapse/storage/_base.py
index 31d5163c19..6dc857c4aa 100644
--- a/synapse/storage/_base.py
+++ b/synapse/storage/_base.py
@@ -452,7 +452,7 @@ class SQLBaseStore(object):
     def _get_event_txn(self, txn, event_id, check_redacted=True,
                        get_prev_content=True):
         sql = (
-            "SELECT json, r.event_id FROM event_json as e "
+            "SELECT internal_metadata, json, r.event_id FROM event_json as e "
             "LEFT JOIN redactions as r ON e.event_id = r.redacts "
             "WHERE e.event_id = ? "
             "LIMIT 1 "
@@ -465,11 +465,12 @@ class SQLBaseStore(object):
         if not res:
             return None
 
-        js, redacted = res
+        internal_metadata, js, redacted = res
 
         d = json.loads(js)
+        internal_metadata = json.loads(internal_metadata)
 
-        ev = FrozenEvent(d)
+        ev = FrozenEvent(d, internal_metadata_dict=internal_metadata)
 
         if check_redacted and redacted:
             ev = prune_event(ev)