Skip to content

Commit

Permalink
Fix server URL overriding in _fresh_intent
Browse files Browse the repository at this point in the history
  • Loading branch information
tulir committed Jul 9, 2024
1 parent 1dbdc3f commit 3e89f1f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions mautrix/bridge/custom_puppet.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,13 @@ def is_real_user(self) -> bool:
return bool(self.custom_mxid and self.access_token)

def _fresh_intent(self) -> IntentAPI:
_, server = self.az.intent.parse_user_id(self.custom_mxid)
try:
self.base_url = self.homeserver_url_map[server]
except KeyError:
if server == self.az.domain:
self.base_url = self.az.intent.api.base_url
if self.custom_mxid:
_, server = self.az.intent.parse_user_id(self.custom_mxid)
try:
self.base_url = self.homeserver_url_map[server]
except KeyError:
if server == self.az.domain:
self.base_url = self.az.intent.api.base_url
if self.access_token == "appservice-config" and self.custom_mxid:
try:
secret = self.login_shared_secret_map[server]
Expand Down

0 comments on commit 3e89f1f

Please sign in to comment.