# HG changeset patch # User Goffi # Date 1600592604 -7200 # Node ID 626046010a2d0cfdf9d1f3f0f93862ecf37a8bbe # Parent d24252df91eedc0029dc11c7ace02733c04a18ac plugin XEP-0329: fix filtering by owner on components diff -r d24252df91ee -r 626046010a2d sat/plugins/plugin_xep_0329.py --- a/sat/plugins/plugin_xep_0329.py Thu Sep 17 23:07:12 2020 +0200 +++ b/sat/plugins/plugin_xep_0329.py Sun Sep 20 11:03:24 2020 +0200 @@ -733,7 +733,7 @@ # affiliations # async def _parseElement(self, client, iq_elt, element, namespace): - from_jid = jid.JID(iq_elt['from']) + peer_jid, owner = self._compParseJids(client, iq_elt) elt = next(iq_elt.elements(namespace, element)) path = Path("/", elt['path']) if len(path.parts) < 2: @@ -741,16 +741,17 @@ namespace = elt.getAttribute('namespace') files_data = await self.host.memory.getFiles( client, - peer_jid=from_jid, + peer_jid=peer_jid, path=str(path.parent), name=path.name, namespace=namespace, + owner=owner, ) if len(files_data) != 1: client.sendError(iq_elt, 'item-not-found') raise exceptions.CancelError file_data = files_data[0] - return from_jid, elt, path, namespace, file_data + return peer_jid, elt, path, namespace, file_data def _affiliationsGet(self, service_jid_s, namespace, path, profile): client = self.host.getClient(profile)