diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-15 14:15:10 +0100 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2014-09-15 14:15:10 +0100 |
commit | b0406b9ead0e3b726ef2c675181d040ca392e85d (patch) | |
tree | 42fdeee7d4b5eb283f6a406463499ae05b9e5ffe /synapse/storage/__init__.py | |
parent | Merge remote-tracking branch 'origin/develop' into test-sqlite-memory (diff) | |
parent | Correctly handle the 'age' key in events and pdus (diff) | |
download | synapse-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__.py | 8 |
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)) |