diff options
-rw-r--r-- | prosody-module/mod_http_upload_external/mod_http_upload_external.lua | 10 |
1 files changed, 10 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 e2e0107..a026da0 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 @@ -27,6 +27,10 @@ module:depends("disco"); -- namespace local xmlns_http_upload = "urn:xmpp:filetransfer:http"; +-- versions +spec_version = "v0.3"; +impl_version = "v0.3-dev"; + module:add_feature(xmlns_http_upload); if filetransfer_manager_ui_url then @@ -318,6 +322,12 @@ module:hook("iq/host/"..xmlns_http_upload..":request", function (event) return deletefile(origin, orig_from, stanza, request); elseif slot_type == "list" then return listfiles(origin, orig_from, stanza, request); + elseif slot_type == "version" then + local reply = st.reply(stanza); + reply:tag("version", { xmlns = xmlns_http_upload }); + reply:tag("xmpp-fileservice-module", { spec = spec_version, implementation = impl_version }):up(); + origin.send(reply); + return true; else origin.send(st.error_reply(stanza, "cancel", "undefined-condition", "status code: " .. statuscode .. " response: " ..respbody)); return true; |