Fix getting an event for a room the server forgot it was in

This commit is contained in:
Erik Johnston 2015-09-16 16:26:03 +01:00
parent 54e688277a
commit c34ffd2736
1 changed files with 61 additions and 49 deletions

View File

@ -125,8 +125,20 @@ class FederationHandler(BaseHandler):
)
if not is_in_room and not event.internal_metadata.is_outlier():
logger.debug("Got event for room we're not in.")
current_state = state
try:
event_stream_id, max_stream_id = yield self._persist_auth_tree(
auth_chain, state, event
)
except AuthError as e:
raise FederationError(
"ERROR",
e.code,
e.msg,
affected=event.event_id,
)
else:
event_ids = set()
if state:
event_ids |= {e.event_id for e in state}