summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorPaul "LeoNerd" Evans <paul@matrix.org>2014-09-15 14:15:10 +0100
committerPaul "LeoNerd" Evans <paul@matrix.org>2014-09-15 14:15:10 +0100
commitb0406b9ead0e3b726ef2c675181d040ca392e85d (patch)
tree42fdeee7d4b5eb283f6a406463499ae05b9e5ffe /synapse/storage/__init__.py
parentMerge remote-tracking branch 'origin/develop' into test-sqlite-memory (diff)
parentCorrectly handle the 'age' key in events and pdus (diff)
downloadsynapse-b0406b9ead0e3b726ef2c675181d040ca392e85d.tar.xz
Merge remote-tracking branch 'origin/develop' into test-sqlite-memory
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 0dbae504b2..88c9a5b88c 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
 
@@ -140,6 +140,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))