diff options
Diffstat (limited to 'synapse/storage/events.py')
-rw-r--r-- | synapse/storage/events.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/synapse/storage/events.py b/synapse/storage/events.py index 38395c66ab..52074b4cc8 100644 --- a/synapse/storage/events.py +++ b/synapse/storage/events.py @@ -107,6 +107,8 @@ class EventsStore(SQLBaseStore): # We purposefully do this first since if we include a `current_state` # key, we *want* to update the `current_state_events` table if current_state: + txn.call_after(self.get_current_state_for_key.invalidate_all) + self._simple_delete_txn( txn, table="current_state_events", @@ -335,6 +337,10 @@ class EventsStore(SQLBaseStore): ) if is_new_state and not context.rejected: + txn.call_after( + self.get_current_state_for_key.invalidate, + event.room_id, event.type, event.state_key + ) self._simple_upsert_txn( txn, "current_state_events", |