mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 10:56:06 -04:00
Stop backpaginating when events not visible
This commit is contained in:
parent
82fca11fc1
commit
71b625d808
3 changed files with 78 additions and 5 deletions
|
@ -442,6 +442,28 @@ class EventFederationWorkerStore(EventsWorkerStore, SignatureWorkerStore,
|
|||
event_results.reverse()
|
||||
return event_results
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_forward_events(self, event_ids):
|
||||
"""Fetch all events that have the given events as a prev event
|
||||
|
||||
Args:
|
||||
event_ids (iterable[str])
|
||||
|
||||
Returns:
|
||||
Deferred[list[str]]
|
||||
"""
|
||||
rows = yield self._simple_select_many_batch(
|
||||
table="event_edges",
|
||||
column="prev_event_id",
|
||||
iterable=event_ids,
|
||||
retcols=("event_id",),
|
||||
desc="get_forward_events"
|
||||
)
|
||||
|
||||
defer.returnValue([
|
||||
row["event_id"] for row in rows
|
||||
])
|
||||
|
||||
|
||||
class EventFederationStore(EventFederationWorkerStore):
|
||||
""" Responsible for storing and serving up the various graphs associated
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue