Add state_key and rejection_reason to events (#11792)

... and start populating them for new events
This commit is contained in:
Richard van der Hoff 2022-01-21 12:21:28 +00:00 committed by GitHub
parent b784299cbc
commit 2aa37a4250
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 42 additions and 5 deletions

View file

@ -19,6 +19,7 @@ from twisted.trial import unittest
from synapse.api.constants import EventTypes
from synapse.api.room_versions import RoomVersions
from synapse.events import EventBase
from synapse.events.snapshot import EventContext
from synapse.rest import admin
from synapse.rest.client import login, room
from synapse.storage.databases.main.events import _LinkMap
@ -391,7 +392,9 @@ class EventChainStoreTestCase(HomeserverTestCase):
def _persist(txn):
# We need to persist the events to the events and state_events
# tables.
persist_events_store._store_event_txn(txn, [(e, {}) for e in events])
persist_events_store._store_event_txn(
txn, [(e, EventContext()) for e in events]
)
# Actually call the function that calculates the auth chain stuff.
persist_events_store._persist_event_auth_chain_txn(txn, events)