From b317ffc7bfff772e83f8770e79218a30a14194f3 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Sat, 6 May 2017 14:15:18 +0200 Subject: prosody-module: Only advertise 'filetransfer-manager-ui-url' if it is set --- .../mod_http_upload_external/mod_http_upload_external.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'prosody-module/mod_http_upload_external') 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 -- cgit v1.2.3