changeset 4096:087902fbb77a

plugin XEP-0060: move setting of `pubsub_watching` to `profile_connecting` so it's available early
author Goffi <goffi@goffi.org>
date Mon, 12 Jun 2023 15:00:59 +0200
parents 684ba556a617
children 0f6fd28fde0d
files libervia/backend/plugins/plugin_xep_0060.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0060.py	Mon Jun 12 14:57:27 2023 +0200
+++ b/libervia/backend/plugins/plugin_xep_0060.py	Mon Jun 12 15:00:59 2023 +0200
@@ -324,8 +324,10 @@
         client.pubsub_client = SatPubSubClient(self.host, self)
         return client.pubsub_client
 
+    def profile_connecting(self, client):
+        client.pubsub_watching = set()
+
     async def profile_connected(self, client):
-        client.pubsub_watching = set()
         try:
             client.pubsub_service = jid.JID(
                 self.host.memory.config_get("", "pubsub_service")