plugin XEP-0329: fix filtering by owner on components
This commit is contained in:
parent
f3bb26f9d9
commit
93e1250a59
1 changed files with 4 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue