Mercurial > libervia-backend
changeset 4098:4a8b29ab34c0
plugin XEP-0363: fix handling of empty `upload_jid` in `_get_slot`
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 22 Jun 2023 15:46:42 +0200 |
parents | 0f6fd28fde0d |
children | 11e802089b19 |
files | libervia/backend/plugins/plugin_xep_0363.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libervia/backend/plugins/plugin_xep_0363.py Thu Jun 22 15:45:20 2023 +0200 +++ b/libervia/backend/plugins/plugin_xep_0363.py Thu Jun 22 15:46:42 2023 +0200 @@ -300,7 +300,8 @@ client = self.host.get_client(profile_key) filename = filename.replace("/", "_") d = defer.ensureDeferred(self.get_slot( - client, filename, size, content_type or None, jid.JID(upload_jid) or None + client, filename, size, content_type or None, + jid.JID(upload_jid) if upload_jid else None )) d.addCallback(lambda slot: (slot.get, slot.put, slot.headers)) return d