From 507d2fd5642b7c13b290a4674ce7d778a348a252 Mon Sep 17 00:00:00 2001 From: steckbrief Date: Sat, 24 Feb 2018 00:20:33 +0100 Subject: added request for version of xmpp-fileservice-module --- .../mod_http_upload_external/mod_http_upload_external.lua | 10 ++++++++++ 1 file changed, 10 insertions(+) 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; -- cgit v1.2.3