Mercurial > libervia-backend
diff sat/plugins/plugin_comp_file_sharing.py @ 3514:6d9c9e2dca0a
component (file sharing): fix retrieving owner from jid when user part is not specified
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 01 May 2021 18:22:53 +0200 |
parents | 375449da79f6 |
children | 849374e59178 |
line wrap: on
line diff
--- a/sat/plugins/plugin_comp_file_sharing.py Thu Apr 29 15:49:59 2021 +0200 +++ b/sat/plugins/plugin_comp_file_sharing.py Sat May 01 18:22:53 2021 +0200 @@ -519,7 +519,10 @@ ): """This method retrieve a file on request, and send if after checking permissions""" peer_jid = session["peer_jid"] - owner = client.getOwnerFromJid(session['local_jid']) + if session['local_jid'].user: + owner = client.getOwnerFromJid(session['local_jid']) + else: + owner = peer_jid try: found_files = yield self.host.memory.getFiles( client,