summary refs log tree commit diff
path: root/synapse/storage/__init__.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2014-11-12 17:02:18 +0000
committerErik Johnston <erik@matrix.org>2014-11-12 17:02:34 +0000
commitf04b3d5042b85fa81efff9b561ca7af8d9709756 (patch)
tree08a37b4e2d62315f1ea6cd5bd0ccba9630594c12 /synapse/storage/__init__.py
parentAdd more recents service unit tests. (diff)
downloadsynapse-f04b3d5042b85fa81efff9b561ca7af8d9709756.tar.xz
Store all signatures on events rather than just dropping them
Diffstat (limited to 'synapse/storage/__init__.py')
-rw-r--r--synapse/storage/__init__.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py
index 72290eb5a0..d8f351a675 100644
--- a/synapse/storage/__init__.py
+++ b/synapse/storage/__init__.py
@@ -279,13 +279,14 @@ class DataStore(RoomMemberStore, RoomStore,
             )
 
         if hasattr(event, "signatures"):
-            signatures = event.signatures.get(event.origin, {})
-
-            for key_id, signature_base64 in signatures.items():
-                signature_bytes = decode_base64(signature_base64)
-                self._store_event_origin_signature_txn(
-                    txn, event.event_id, event.origin, key_id, signature_bytes,
-                )
+            logger.debug("sigs: %s", event.signatures)
+            for name, sigs in event.signatures.items():
+                for key_id, signature_base64 in sigs.items():
+                    signature_bytes = decode_base64(signature_base64)
+                    self._store_event_signature_txn(
+                        txn, event.event_id, name, key_id,
+                        signature_bytes,
+                    )
 
         for prev_event_id, prev_hashes in event.prev_events:
             for alg, hash_base64 in prev_hashes.items():