Преглед на файлове

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 години
родител
ревизия
a121797024
променени са 1 файла, в които са добавени 2 реда и са изтрити 0 реда
  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: