aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2018-02-24 00:20:33 +0100
committersteckbrief <steckbrief@chefmail.de>2018-02-24 00:20:33 +0100
commit507d2fd5642b7c13b290a4674ce7d778a348a252 (patch)
treeb42fdab14f1a1c244c5bfc8b682fce15d00df25e
parenta46124c178edf9958478f10b4c18799c9e93b3fc (diff)
added request for version of xmpp-fileservice-module
-rw-r--r--prosody-module/mod_http_upload_external/mod_http_upload_external.lua10
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;