@@ -363,12 +363,13 @@ async def handle_event(event: EventBase) -> None:
363
363
# will have a `sender` on a different server, so will be
364
364
# skipped by the "is_mine" test above anyway.
365
365
#
366
- # (2) rejections of invites to federated rooms. These are normally
367
- # created via federation (in which case the remote server is
368
- # responsible for sending out the rejection). If that fails,
366
+ # (2) rejections of invites to federated rooms - either remotely
367
+ # or locally generated. (Such rejections are normally
368
+ # created via federation, in which case the remote server is
369
+ # responsible for sending out the rejection. If that fails,
369
370
# we'll create a leave event locally, but that's only really
370
371
# for the benefit of the invited user - we don't have enough
371
- # information to send it out over federation.
372
+ # information to send it out over federation) .
372
373
#
373
374
# (2a) rescinded knocks. These are identical to rejected invites.
374
375
#
@@ -382,6 +383,11 @@ async def handle_event(event: EventBase) -> None:
382
383
# ignore them, we'll get an exception further down when we try to
383
384
# fetch the membership list for the room.
384
385
#
386
+ # Arguably, we could equivalently ignore all outliers here, since
387
+ # in theory the only way for an outlier with a local `sender` to
388
+ # exist is by being an OOB membership (via one of (2), (2a) or (3)
389
+ # above).
390
+ #
385
391
if event .internal_metadata .is_out_of_band_membership ():
386
392
return
387
393
0 commit comments