Skip to content

Commit

Permalink
Register if /versions fails with M_FORBIDDEN
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jul 12, 2024
1 parent 6d1d944 commit 6fc1c6a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mautrix/bridge/matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,12 @@ async def wait_for_connection(self) -> None:
try:
self.versions = await self.az.intent.versions()
break
except MForbidden:
self.log.debug(
"/versions endpoint returned M_FORBIDDEN, "
"trying to register bridge bot before retrying..."
)
await self.az.intent.ensure_registered()
except Exception:
self.log.exception("Connection to homeserver failed, retrying in 10 seconds")
await asyncio.sleep(10)
Expand Down

0 comments on commit 6fc1c6a

Please sign in to comment.