mod_disco: Skip code specific to disco on user accounts (avoids invoking usermanager, fixes #1150)
authorKim Alvefur <zash@zash.se>
Mon, 28 May 2018 21:30:32 +0200
changeset 8837 b0093d3b2d04
parent 8830 1a29b56a2d63
child 8838 a7221ada9368
mod_disco: Skip code specific to disco on user accounts (avoids invoking usermanager, fixes #1150)
plugins/mod_disco.lua
--- a/plugins/mod_disco.lua	Fri May 25 03:30:16 2018 +0200
+++ b/plugins/mod_disco.lua	Mon May 28 21:30:32 2018 +0200
@@ -154,6 +154,7 @@
 end);
 
 -- Handle disco requests to user accounts
+if module:get_host_type() ~= "local" then	return end -- skip for components
 module:hook("iq/bare/http://jabber.org/protocol/disco#info:query", function(event)
 	local origin, stanza = event.origin, event.stanza;
 	if stanza.attr.type ~= "get" then return; end