mod_query_client_ver: Signal that events are handled even when no response is returned (see #876)
authorKim Alvefur <zash@zash.se>
Thu, 30 Mar 2017 21:04:40 +0200
changeset 2656 20ebfa4ad7f4
parent 2655 2b741e68433b
child 2657 96eabf8591a6
mod_query_client_ver: Signal that events are handled even when no response is returned (see #876)
mod_query_client_ver/mod_query_client_ver.lua
--- a/mod_query_client_ver/mod_query_client_ver.lua	Tue Mar 28 17:09:39 2017 +0200
+++ b/mod_query_client_ver/mod_query_client_ver.lua	Thu Mar 30 21:04:40 2017 +0200
@@ -34,6 +34,7 @@
 		end
 	end
 	origin.send(st.iq({ id = disco_id, type = "get", from = module.host, to = origin.full_jid }):query(xmlns_disco_info));
+	return true;
 end);
 
 module:hook("iq-result/host/"..disco_id, function(event)
@@ -43,9 +44,9 @@
 		local ident = query:get_child("identity");
 		if ident and ident.attr.name then
 			origin.log("info", "Running %s", ident.attr.name);
-			return true;
 		end
 	end
 	-- Unknown software
+	return true;
 end);