aboutsummaryrefslogtreecommitdiffstats
path: root/prosody-module
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-05-06 14:15:18 +0200
committersteckbrief <steckbrief@chefmail.de>2017-05-06 14:15:18 +0200
commitb317ffc7bfff772e83f8770e79218a30a14194f3 (patch)
tree42b6015a57d6a4729715cb017d0ac4f9f27269d0 /prosody-module
parent49c6bb9f0b4ff2cc8b6a8d45d3160f3581b10026 (diff)
prosody-module: Only advertise 'filetransfer-manager-ui-url' if it is set
Diffstat (limited to 'prosody-module')
-rw-r--r--prosody-module/mod_http_upload_external/mod_http_upload_external.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/prosody-module/mod_http_upload_external/mod_http_upload_external.lua b/prosody-module/mod_http_upload_external/mod_http_upload_external.lua
index 337b257..50f1f78 100644
--- a/prosody-module/mod_http_upload_external/mod_http_upload_external.lua
+++ b/prosody-module/mod_http_upload_external/mod_http_upload_external.lua
@@ -29,11 +29,13 @@ local xmlns_http_upload = "urn:xmpp:filetransfer:http";
module:add_feature(xmlns_http_upload);
--- add additional disco info to advertise managing UI
-module:add_extension(dataform {
+if filetransfer_manager_ui_url then
+ -- add additional disco info to advertise managing UI
+ module:add_extension(dataform {
{ name = "FORM_TYPE", type = "hidden", value = xmlns_http_upload },
{ name = "filetransfer-manager-ui-url", type = "text-single" },
-}:form({ ["filetransfer-manager-ui-url"] = filetransfer_manager_ui_url }, "result"));
+ }:form({ ["filetransfer-manager-ui-url"] = filetransfer_manager_ui_url }, "result"));
+end
local function listfiles(origin, orig_from, stanza, request)
-- build the body