diff --git a/libervia/backend/plugins/plugin_xep_0215.py b/libervia/backend/plugins/plugin_xep_0215.py index f5d07042..0dca465a 100644 --- a/libervia/backend/plugins/plugin_xep_0215.py +++ b/libervia/backend/plugins/plugin_xep_0215.py @@ -179,7 +179,7 @@ class XEP_0215: try: cached_services = client._xep_0215_services[entity] except KeyError: - if not self.host.hasFeature(client, NS_EXTDISCO, entity): + if not await self.host.memory.disco.has_feature(client, NS_EXTDISCO, entity): cached_services = client._xep_0215_services[entity] = None else: iq_elt = client.IQ("get") diff --git a/libervia/backend/plugins/plugin_xep_0376.py b/libervia/backend/plugins/plugin_xep_0376.py index e2a7f20f..648970df 100644 --- a/libervia/backend/plugins/plugin_xep_0376.py +++ b/libervia/backend/plugins/plugin_xep_0376.py @@ -59,7 +59,7 @@ class XEP_0376: return XEP_0376_Handler() async def profile_connected(self, client): - if not self.host.hasFeature(client, NS_PAM): + if not await self.host.memory.disco.has_feature(client, NS_PAM): log.warning( "Your server doesn't support Pubsub Account Management, this is used to " "track all your subscriptions. You may ask your server administrator to " @@ -105,7 +105,7 @@ class XEP_0376: sub_jid: Optional[jid.JID] = None, options: Optional[dict] = None, ) -> Tuple[bool, Optional[pubsub.Subscription]]: - if not self.host.hasFeature(client, NS_PAM) or client.is_component: + if not await self.host.memory.disco.has_feature(client, NS_PAM) or client.is_component: return True, None await self._sub_request(client, service, nodeIdentifier, sub_jid, options, True) @@ -127,7 +127,7 @@ class XEP_0376: subscriptionIdentifier: Optional[str], sender: Optional[jid.JID] = None, ) -> bool: - if not self.host.hasFeature(client, NS_PAM) or client.is_component: + if not await self.host.memory.disco.has_feature(client, NS_PAM) or client.is_component: return True await self._sub_request(client, service, nodeIdentifier, sub_jid, None, False) return False @@ -138,7 +138,7 @@ class XEP_0376: service: Optional[jid.JID], node: str, ) -> Tuple[bool, Optional[List[Dict[str, Any]]]]: - if not self.host.hasFeature(client, NS_PAM): + if not await self.host.has_feature(client, NS_PAM): return True, None if service is not None or node is not None: # if we have service and/or node subscriptions, it's a regular XEP-0060