Skip to content

Commit 55c53e0

Browse files
committedJul 9, 2024·
Don't use cached base URL for double puppeting if one is configured
1 parent 8eca64e commit 55c53e0

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed
 

‎mautrix/bridge/custom_puppet.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,13 @@ def is_real_user(self) -> bool:
132132
return bool(self.custom_mxid and self.access_token)
133133

134134
def _fresh_intent(self) -> IntentAPI:
135+
_, server = self.az.intent.parse_user_id(self.custom_mxid)
136+
try:
137+
self.base_url = self.homeserver_url_map[server]
138+
except KeyError:
139+
if server == self.az.domain:
140+
self.base_url = self.az.intent.api.base_url
135141
if self.access_token == "appservice-config" and self.custom_mxid:
136-
_, server = self.az.intent.parse_user_id(self.custom_mxid)
137142
try:
138143
secret = self.login_shared_secret_map[server]
139144
except KeyError:

0 commit comments

Comments
 (0)
Please sign in to comment.