Skip to content

Commit 9f829cf

Browse files
committed
Fix login API called when MSC4190 enabled
Neither the GET nor POST variants of the Synapse `/login` API should be called when support for MSC4190 is enabled: https://areweoidcyet.com/ Fixes: mautrix/telegram#1020
1 parent dbf6425 commit 9f829cf

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

mautrix/bridge/e2ee.py

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -247,12 +247,13 @@ async def decrypt(self, evt: EncryptedEvent, wait_session_timeout: int = 5) -> M
247247
return decrypted
248248

249249
async def start(self) -> None:
250-
flows = await self.client.get_login_flows()
251-
if not self.msc4190 and not flows.supports_type(LoginType.APPSERVICE):
252-
self.log.critical(
253-
"Encryption enabled in config, but homeserver does not support appservice login"
254-
)
255-
sys.exit(30)
250+
if not self.msc4190:
251+
flows = await self.client.get_login_flows()
252+
if not flows.supports_type(LoginType.APPSERVICE):
253+
self.log.critical(
254+
"Encryption enabled in config, but homeserver does not support appservice login"
255+
)
256+
sys.exit(30)
256257
self.log.debug("Logging in with bridge bot user")
257258
if self.crypto_db:
258259
try:

0 commit comments

Comments
 (0)