diff options
-rw-r--r-- | prosody-module/mod_http_upload_external/mod_http_upload_external.lua | 8 |
1 files changed, 8 insertions, 0 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 23e356e..f88b29c 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 @@ -12,11 +12,13 @@ -- configuration local external_url = module:get_option("http_upload_external_url"); local xmpp_server_key = module:get_option("http_upload_external_server_key"); +local filetransfer_manager_ui_url = module:get_option("filetransfer_manager_ui_url"); -- imports local st = require"util.stanza"; local http = require"socket.http"; local json = require"util.json"; +local dataform = require "util.dataforms".new; -- depends module:depends("disco"); @@ -26,6 +28,12 @@ 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 { + { 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")); + -- hooks module:hook("iq/host/"..xmlns_http_upload..":request", function (event) local stanza, origin = event.stanza, event.origin; |