mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:46:06 -04:00
Add helpers for getting prev and auth events (#4139)
* Add helpers for getting prev and auth events This is in preparation for allowing the event format to change between room versions.
This commit is contained in:
parent
0467384d2f
commit
bc80b3f454
10 changed files with 62 additions and 45 deletions
|
@ -477,7 +477,7 @@ class EventFederationStore(EventFederationWorkerStore):
|
|||
"is_state": False,
|
||||
}
|
||||
for ev in events
|
||||
for e_id, _ in ev.prev_events
|
||||
for e_id in ev.prev_event_ids()
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -510,7 +510,7 @@ class EventFederationStore(EventFederationWorkerStore):
|
|||
|
||||
txn.executemany(query, [
|
||||
(e_id, ev.room_id, e_id, ev.room_id, e_id, ev.room_id, False)
|
||||
for ev in events for e_id, _ in ev.prev_events
|
||||
for ev in events for e_id in ev.prev_event_ids()
|
||||
if not ev.internal_metadata.is_outlier()
|
||||
])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue