From ae0402fd752fa0be7d8dd0315852c541dd42ff70 Mon Sep 17 00:00:00 2001 From: Goffi Date: Thu, 22 Jun 2023 15:46:42 +0200 Subject: [PATCH] plugin XEP-0363: fix handling of empty `upload_jid` in `_get_slot` --- libervia/backend/plugins/plugin_xep_0363.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libervia/backend/plugins/plugin_xep_0363.py b/libervia/backend/plugins/plugin_xep_0363.py index 3c82eabb..371cb86c 100644 --- a/libervia/backend/plugins/plugin_xep_0363.py +++ b/libervia/backend/plugins/plugin_xep_0363.py @@ -300,7 +300,8 @@ class XEP_0363: 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