equal
deleted
inserted
replaced
86 module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(event) |
86 module:hook("iq/host/http://jabber.org/protocol/disco#info:query", function(event) |
87 local origin, stanza = event.origin, event.stanza; |
87 local origin, stanza = event.origin, event.stanza; |
88 if stanza.attr.type ~= "get" then return; end |
88 if stanza.attr.type ~= "get" then return; end |
89 local node = stanza.tags[1].attr.node; |
89 local node = stanza.tags[1].attr.node; |
90 if node and node ~= "" and node ~= "http://prosody.im#"..get_server_caps_hash() then return; end -- TODO fire event? |
90 if node and node ~= "" and node ~= "http://prosody.im#"..get_server_caps_hash() then return; end -- TODO fire event? |
91 local reply = st.reply(stanza):add_child(get_server_disco_info()); |
91 local reply_query = get_server_disco_info(); |
|
92 reply_query.node = node; |
|
93 local reply = st.reply(stanza):add_child(reply_query); |
92 origin.send(reply); |
94 origin.send(reply); |
93 return true; |
95 return true; |
94 end); |
96 end); |
95 module:hook("iq/host/http://jabber.org/protocol/disco#items:query", function(event) |
97 module:hook("iq/host/http://jabber.org/protocol/disco#items:query", function(event) |
96 local origin, stanza = event.origin, event.stanza; |
98 local origin, stanza = event.origin, event.stanza; |