23 |
23 |
24 local log = require "util.logger".init("mod_version"); |
24 local log = require "util.logger".init("mod_version"); |
25 |
25 |
26 local xmlns_version = "jabber:iq:version" |
26 local xmlns_version = "jabber:iq:version" |
27 |
27 |
28 require "core.discomanager".set("version", xmlns_version); |
28 module:add_feature(xmlns_version); |
29 |
29 |
30 local function handle_version_request(session, stanza) |
30 local function handle_version_request(session, stanza) |
31 if stanza.attr.type == "get" then |
31 if stanza.attr.type == "get" then |
32 session.send(st.reply(stanza):query(xmlns_version) |
32 session.send(st.reply(stanza):query(xmlns_version) |
33 :tag("name"):text("Prosody"):up() |
33 :tag("name"):text("Prosody"):up() |