mod_iq: Don't stop event dispatch for unhandled IQ errors and results (this lets negative priority handlers intercept the events).

Thu, 02 Dec 2010 16:04:42 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Thu, 02 Dec 2010 16:04:42 +0500
changeset 3673
43b854062206
parent 3672
b24db47995ac
child 3674
4b7281c577b9

mod_iq: Don't stop event dispatch for unhandled IQ errors and results (this lets negative priority handlers intercept the events).

plugins/mod_iq.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_iq.lua	Wed Dec 01 23:38:47 2010 +0100
+++ b/plugins/mod_iq.lua	Thu Dec 02 16:04:42 2010 +0500
@@ -41,8 +41,7 @@
 		if ret ~= nil then return ret; end
 		return module:fire_event("iq-"..type.."/bare/"..child.attr.xmlns..":"..child.name, data);
 	else
-		module:fire_event("iq-"..type.."/bare/"..stanza.attr.id, data);
-		return true;
+		return module:fire_event("iq-"..type.."/bare/"..stanza.attr.id, data);
 	end
 end);
 
@@ -57,8 +56,7 @@
 		if ret ~= nil then return ret; end
 		return module:fire_event("iq-"..type.."/self/"..child.attr.xmlns..":"..child.name, data);
 	else
-		module:fire_event("iq-"..type.."/self/"..stanza.attr.id, data);
-		return true;
+		return module:fire_event("iq-"..type.."/self/"..stanza.attr.id, data);
 	end
 end);
 
@@ -73,7 +71,6 @@
 		if ret ~= nil then return ret; end
 		return module:fire_event("iq-"..type.."/host/"..child.attr.xmlns..":"..child.name, data);
 	else
-		module:fire_event("iq-"..type.."/host/"..stanza.attr.id, data);
-		return true;
+		return module:fire_event("iq-"..type.."/host/"..stanza.attr.id, data);
 	end
 end);

mercurial