@@ -268,6 +268,7 @@ async def _local_membership_update(
268
268
content : Optional [dict ] = None ,
269
269
require_consent : bool = True ,
270
270
outlier : bool = False ,
271
+ historical : bool = False ,
271
272
) -> Tuple [str , int ]:
272
273
"""
273
274
Internal membership update function to get an existing event or create
@@ -293,6 +294,9 @@ async def _local_membership_update(
293
294
outlier: Indicates whether the event is an `outlier`, i.e. if
294
295
it's from an arbitrary point and floating in the DAG as
295
296
opposed to being inline with the current DAG.
297
+ historical: Indicates whether the message is being inserted
298
+ back in time around some existing events. This is used to skip
299
+ a few checks and mark the event as backfilled.
296
300
297
301
Returns:
298
302
Tuple of event ID and stream ordering position
@@ -337,6 +341,7 @@ async def _local_membership_update(
337
341
auth_event_ids = auth_event_ids ,
338
342
require_consent = require_consent ,
339
343
outlier = outlier ,
344
+ historical = historical ,
340
345
)
341
346
342
347
prev_state_ids = await context .get_prev_state_ids ()
@@ -433,6 +438,7 @@ async def update_membership(
433
438
new_room : bool = False ,
434
439
require_consent : bool = True ,
435
440
outlier : bool = False ,
441
+ historical : bool = False ,
436
442
prev_event_ids : Optional [List [str ]] = None ,
437
443
auth_event_ids : Optional [List [str ]] = None ,
438
444
) -> Tuple [str , int ]:
@@ -454,6 +460,9 @@ async def update_membership(
454
460
outlier: Indicates whether the event is an `outlier`, i.e. if
455
461
it's from an arbitrary point and floating in the DAG as
456
462
opposed to being inline with the current DAG.
463
+ historical: Indicates whether the message is being inserted
464
+ back in time around some existing events. This is used to skip
465
+ a few checks and mark the event as backfilled.
457
466
prev_event_ids: The event IDs to use as the prev events
458
467
auth_event_ids:
459
468
The event ids to use as the auth_events for the new event.
@@ -487,6 +496,7 @@ async def update_membership(
487
496
new_room = new_room ,
488
497
require_consent = require_consent ,
489
498
outlier = outlier ,
499
+ historical = historical ,
490
500
prev_event_ids = prev_event_ids ,
491
501
auth_event_ids = auth_event_ids ,
492
502
)
@@ -507,6 +517,7 @@ async def update_membership_locked(
507
517
new_room : bool = False ,
508
518
require_consent : bool = True ,
509
519
outlier : bool = False ,
520
+ historical : bool = False ,
510
521
prev_event_ids : Optional [List [str ]] = None ,
511
522
auth_event_ids : Optional [List [str ]] = None ,
512
523
) -> Tuple [str , int ]:
@@ -530,6 +541,9 @@ async def update_membership_locked(
530
541
outlier: Indicates whether the event is an `outlier`, i.e. if
531
542
it's from an arbitrary point and floating in the DAG as
532
543
opposed to being inline with the current DAG.
544
+ historical: Indicates whether the message is being inserted
545
+ back in time around some existing events. This is used to skip
546
+ a few checks and mark the event as backfilled.
533
547
prev_event_ids: The event IDs to use as the prev events
534
548
auth_event_ids:
535
549
The event ids to use as the auth_events for the new event.
@@ -657,6 +671,7 @@ async def update_membership_locked(
657
671
content = content ,
658
672
require_consent = require_consent ,
659
673
outlier = outlier ,
674
+ historical = historical ,
660
675
)
661
676
662
677
latest_event_ids = await self .store .get_prev_events_for_room (room_id )
0 commit comments