Comparison

plugins/mod_disco.lua @ 8843:041ddc670934

Merge 0.10->trunk
author Matthew Wild <mwild1@gmail.com>
date Wed, 30 May 2018 21:40:00 +0100
parent 8834:b0093d3b2d04
child 9223:80dbb60d81e4
comparison
equal deleted inserted replaced
8833:9c90cd2fc4c3 8843:041ddc670934
152 event.features:add_child(get_server_caps_feature()); 152 event.features:add_child(get_server_caps_feature());
153 end 153 end
154 end); 154 end);
155 155
156 -- Handle disco requests to user accounts 156 -- Handle disco requests to user accounts
157 if module:get_host_type() ~= "local" then return end -- skip for components
157 module:hook("iq/bare/http://jabber.org/protocol/disco#info:query", function(event) 158 module:hook("iq/bare/http://jabber.org/protocol/disco#info:query", function(event)
158 local origin, stanza = event.origin, event.stanza; 159 local origin, stanza = event.origin, event.stanza;
159 if stanza.attr.type ~= "get" then return; end 160 if stanza.attr.type ~= "get" then return; end
160 local node = stanza.tags[1].attr.node; 161 local node = stanza.tags[1].attr.node;
161 local username = jid_split(stanza.attr.to) or origin.username; 162 local username = jid_split(stanza.attr.to) or origin.username;