Browse Source

Fix updating MQTT proxy when changed

This means when the MQTT connection itself handles a change it passes it
back to the `User` which then calls back to `MQTT.setup_proxy`, so a lot
of indirection there. However, the benefit is we have a single place that
updates both HTTP + MQTT proxies.
Nick Barrett 2 years ago
parent
commit
a121797024
1 changed files with 2 additions and 0 deletions
  1. 2 0
      mautrix_instagram/user.py

+ 2 - 0
mautrix_instagram/user.py

@@ -353,6 +353,8 @@ class User(DBUser, BaseUser):
     async def on_proxy_update(self, evt: ProxyUpdate | None = None) -> None:
         if self.client:
             self.client.setup_http(self.state.cookies.jar)
+        if self.mqtt:
+            self.mqtt.setup_proxy()
 
     # TODO this stuff could probably be moved to mautrix-python
     async def get_notice_room(self) -> RoomID: