diff --git a/sat/plugins/plugin_xep_0329.py b/sat/plugins/plugin_xep_0329.py index 7dbec2c4..d193b099 100644 --- a/sat/plugins/plugin_xep_0329.py +++ b/sat/plugins/plugin_xep_0329.py @@ -733,7 +733,7 @@ class XEP_0329(object): # 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 @@ class XEP_0329(object): 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)