Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Remove unused on_query_auth which should have been removed in #7026.
Browse files Browse the repository at this point in the history
  • Loading branch information
clokep committed Apr 5, 2021
1 parent 8aa99f9 commit 9021659
Showing 1 changed file with 0 additions and 31 deletions.
31 changes: 0 additions & 31 deletions synapse/handlers/federation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2303,37 +2303,6 @@ async def _check_for_soft_fail(
logger.warning("Soft-failing %r because %s", event, e)
event.internal_metadata.soft_failed = True

async def on_query_auth(
self, origin, event_id, room_id, remote_auth_chain, rejects, missing
):
in_room = await self.auth.check_host_in_room(room_id, origin)
if not in_room:
raise AuthError(403, "Host not in room.")

event = await self.store.get_event(event_id, check_room_id=room_id)

# Just go through and process each event in `remote_auth_chain`. We
# don't want to fall into the trap of `missing` being wrong.
for e in remote_auth_chain:
try:
await self._handle_new_event(origin, e)
except AuthError:
pass

# Now get the current auth_chain for the event.
local_auth_chain = await self.store.get_auth_chain(
room_id, list(event.auth_event_ids()), include_given=True
)

# TODO: Check if we would now reject event_id. If so we need to tell
# everyone.

ret = await self.construct_auth_difference(local_auth_chain, remote_auth_chain)

logger.debug("on_query_auth returning: %s", ret)

return ret

async def on_get_missing_events(
self,
origin: str,
Expand Down

0 comments on commit 9021659

Please sign in to comment.