summary refs log tree commit diff
path: root/synapse/storage/events.py
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2016-07-25 16:12:16 +0100
committerMark Haines <mark.haines@matrix.org>2016-07-25 16:12:16 +0100
commit2623cec8746392067e781164e8ed4f2236b15bec (patch)
treec8e64399145114586b2044d0cba79f7ea133283e /synapse/storage/events.py
parentfix: defer.returnValue takes one argument (diff)
downloadsynapse-2623cec8746392067e781164e8ed4f2236b15bec.tar.xz
Don't add rejections to the state_group, persist all rejections
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r--synapse/storage/events.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py
index 6610549281..41c9b17d14 100644
--- a/synapse/storage/events.py
+++ b/synapse/storage/events.py
@@ -591,10 +591,11 @@ class EventsStore(SQLBaseStore):
             ],
         )
 
-        if context.rejected:
-            self._store_rejections_txn(
-                txn, event.event_id, context.rejected
-            )
+        for event, context in events_and_contexts:
+            if context.rejected:
+                self._store_rejections_txn(
+                    txn, event.event_id, context.rejected
+                )
 
         self._simple_insert_many_txn(
             txn,