prosody-module: Only advertise 'filetransfer-manager-ui-url' if it is set

This commit is contained in:
steckbrief 2017-05-06 14:15:18 +02:00
parent 49c6bb9f0b
commit b317ffc7bf

View file

@ -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