comparison libervia/backend/plugins/plugin_xep_0060.py @ 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 4b842c1fb686
children 2b000790b197
comparison
equal deleted inserted replaced
4095:684ba556a617 4096:087902fbb77a
322 322
323 def get_handler(self, client): 323 def get_handler(self, client):
324 client.pubsub_client = SatPubSubClient(self.host, self) 324 client.pubsub_client = SatPubSubClient(self.host, self)
325 return client.pubsub_client 325 return client.pubsub_client
326 326
327 def profile_connecting(self, client):
328 client.pubsub_watching = set()
329
327 async def profile_connected(self, client): 330 async def profile_connected(self, client):
328 client.pubsub_watching = set()
329 try: 331 try:
330 client.pubsub_service = jid.JID( 332 client.pubsub_service = jid.JID(
331 self.host.memory.config_get("", "pubsub_service") 333 self.host.memory.config_get("", "pubsub_service")
332 ) 334 )
333 except RuntimeError: 335 except RuntimeError: