mirror of
https://mau.dev/maunium/synapse.git
synced 2024-12-14 23:13:52 +01:00
Merge pull request #69 from matrix-org/hotfixes-v0.7.0a
Hotfixes v0.7.0a
This commit is contained in:
commit
a268c31737
2 changed files with 7 additions and 8 deletions
|
@ -16,4 +16,4 @@
|
|||
""" This is a reference implementation of a Matrix home server.
|
||||
"""
|
||||
|
||||
__version__ = "0.7.0"
|
||||
__version__ = "0.7.0a"
|
||||
|
|
|
@ -55,17 +55,16 @@ class EventFederationStore(SQLBaseStore):
|
|||
results = set()
|
||||
|
||||
base_sql = (
|
||||
"SELECT auth_id FROM event_auth WHERE %s"
|
||||
"SELECT auth_id FROM event_auth WHERE event_id = ?"
|
||||
)
|
||||
|
||||
front = set(event_ids)
|
||||
while front:
|
||||
sql = base_sql % (
|
||||
" OR ".join(["event_id=?"] * len(front)),
|
||||
)
|
||||
|
||||
txn.execute(sql, list(front))
|
||||
front = [r[0] for r in txn.fetchall()]
|
||||
new_front = set()
|
||||
for f in front:
|
||||
txn.execute(base_sql, (f,))
|
||||
new_front.update([r[0] for r in txn.fetchall()])
|
||||
front = new_front
|
||||
results.update(front)
|
||||
|
||||
return list(results)
|
||||
|
|
Loading…
Reference in a new issue