mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-12-25 20:29:23 -05:00
Add back backfilled parameter that was removed
This commit is contained in:
parent
0d3da210f0
commit
762ada1e07
@ -1090,7 +1090,8 @@ class FederationHandler(BaseHandler):
|
||||
|
||||
@defer.inlineCallbacks
|
||||
@log_function
|
||||
def _handle_new_event(self, origin, event, state=None, auth_events=None):
|
||||
def _handle_new_event(self, origin, event, state=None, auth_events=None,
|
||||
backfilled=False):
|
||||
context = yield self._prep_event(
|
||||
origin, event,
|
||||
state=state,
|
||||
@ -1106,6 +1107,7 @@ class FederationHandler(BaseHandler):
|
||||
event_stream_id, max_stream_id = yield self.store.persist_event(
|
||||
event,
|
||||
context=context,
|
||||
backfilled=backfilled,
|
||||
)
|
||||
|
||||
# this intentionally does not yield: we don't care about the result
|
||||
|
@ -118,7 +118,7 @@ class EventsStore(SQLBaseStore):
|
||||
|
||||
@defer.inlineCallbacks
|
||||
@log_function
|
||||
def persist_event(self, event, context, current_state=None):
|
||||
def persist_event(self, event, context, current_state=None, backfilled=False):
|
||||
|
||||
try:
|
||||
with self._stream_id_gen.get_next() as stream_ordering:
|
||||
@ -131,6 +131,7 @@ class EventsStore(SQLBaseStore):
|
||||
event=event,
|
||||
context=context,
|
||||
current_state=current_state,
|
||||
backfilled=backfilled,
|
||||
)
|
||||
except _RollbackButIsFineException:
|
||||
pass
|
||||
@ -195,7 +196,7 @@ class EventsStore(SQLBaseStore):
|
||||
defer.returnValue({e.event_id: e for e in events})
|
||||
|
||||
@log_function
|
||||
def _persist_event_txn(self, txn, event, context, current_state):
|
||||
def _persist_event_txn(self, txn, event, context, current_state, backfilled=False):
|
||||
# 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:
|
||||
@ -238,7 +239,7 @@ class EventsStore(SQLBaseStore):
|
||||
return self._persist_events_txn(
|
||||
txn,
|
||||
[(event, context)],
|
||||
backfilled=False,
|
||||
backfilled=backfilled,
|
||||
)
|
||||
|
||||
@log_function
|
||||
|
Loading…
Reference in New Issue
Block a user