equal
deleted
inserted
replaced
97 local origin, stanza = event.origin, event.stanza; |
97 local origin, stanza = event.origin, event.stanza; |
98 if stanza.attr.type ~= "get" then return; end |
98 if stanza.attr.type ~= "get" then return; end |
99 local node = stanza.tags[1].attr.node; |
99 local node = stanza.tags[1].attr.node; |
100 if node and node ~= "" and node ~= "http://prosody.im#"..get_server_caps_hash() then return; end -- TODO fire event? |
100 if node and node ~= "" and node ~= "http://prosody.im#"..get_server_caps_hash() then return; end -- TODO fire event? |
101 local reply_query = get_server_disco_info(); |
101 local reply_query = get_server_disco_info(); |
102 reply_query.node = node; |
102 reply_query.attr.node = node; |
103 local reply = st.reply(stanza):add_child(reply_query); |
103 local reply = st.reply(stanza):add_child(reply_query); |
104 origin.send(reply); |
104 origin.send(reply); |
105 return true; |
105 return true; |
106 end); |
106 end); |
107 module:hook("iq/host/http://jabber.org/protocol/disco#items:query", function(event) |
107 module:hook("iq/host/http://jabber.org/protocol/disco#items:query", function(event) |