component file sharing: added missing owner filtering in _retrieveFiles
This commit is contained in:
parent
50df9e6537
commit
f7a83dd054
1 changed files with 3 additions and 0 deletions
|
|
@ -54,6 +54,7 @@ PLUGIN_INFO = {
|
|||
C.PI_DEPENDENCIES: [
|
||||
"FILE",
|
||||
"FILE_SHARING_MANAGEMENT",
|
||||
"XEP-0106",
|
||||
"XEP-0234",
|
||||
"XEP-0260",
|
||||
"XEP-0261",
|
||||
|
|
@ -518,6 +519,7 @@ class FileSharing:
|
|||
):
|
||||
"""This method retrieve a file on request, and send if after checking permissions"""
|
||||
peer_jid = session["peer_jid"]
|
||||
owner = client.getOwnerFromJid(session['local_jid'])
|
||||
try:
|
||||
found_files = yield self.host.memory.getFiles(
|
||||
client,
|
||||
|
|
@ -527,6 +529,7 @@ class FileSharing:
|
|||
hash_algo=file_data.get("hash_algo"),
|
||||
path=file_data.get("path"),
|
||||
namespace=file_data.get("namespace"),
|
||||
owner=owner,
|
||||
)
|
||||
except exceptions.NotFound:
|
||||
found_files = None
|
||||
|
|
|
|||
Loading…
Reference in a new issue