summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-09-12 17:56:21 +0100
committerErik Johnston <erik@matrix.org>2014-09-12 17:56:21 +0100
commit667e747ed11a418da317a03fc3c59a205c5c4af0 (patch)
tree43f2138b6197118013ee6df18450c4e4c3c00cd0 /synapse/storage/__init__.py
parentMake the state resolution use actual power levels rather than taking them fro... (diff)
downloadsynapse-667e747ed11a418da317a03fc3c59a205c5c4af0.tar.xz
Fix bug where we no longer stored user_id on Pdus
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index ad2a484c16..9201a377b6 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -36,7 +36,7 @@ from .registration import RegistrationStore
 from .room import RoomStore
 from .roommember import RoomMemberStore
 from .stream import StreamStore
-from .pdu import StatePduStore, PduStore
+from .pdu import StatePduStore, PduStore, PdusTable
 from .transactions import TransactionStore
 from .keys import KeyStore
 
@@ -123,6 +123,12 @@ class DataStore(RoomMemberStore, RoomStore,
         del cols["content"]
         del cols["prev_pdus"]
         cols["content_json"] = json.dumps(pdu.content)
+
+        unrec_keys.update({
+            k: v for k, v in cols.items()
+            if k not in PdusTable.fields
+        })
+
         cols["unrecognized_keys"] = json.dumps(unrec_keys)
 
         logger.debug("Persisting: %s", repr(cols))