mod_iq: IQ error and result sub-events are now "iq-{error,result}/{host,self,bare}/id" (previously "iq/{host,self,bare}/id").

Sun, 28 Nov 2010 02:03:59 +0500

author
Waqas Hussain <waqas20@gmail.com>
date
Sun, 28 Nov 2010 02:03:59 +0500
changeset 3651
140ce81778ca
parent 3646
66c5fb109e64
child 3652
c0148fddd81f

mod_iq: IQ error and result sub-events are now "iq-{error,result}/{host,self,bare}/id" (previously "iq/{host,self,bare}/id").

plugins/mod_iq.lua file | annotate | diff | comparison | revisions
--- a/plugins/mod_iq.lua	Sat Nov 27 19:49:29 2010 +0000
+++ b/plugins/mod_iq.lua	Sun Nov 28 02:03:59 2010 +0500
@@ -37,7 +37,7 @@
 	if stanza.attr.type == "get" or stanza.attr.type == "set" then
 		return module:fire_event("iq/bare/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
 	else
-		module:fire_event("iq/bare/"..stanza.attr.id, data);
+		module:fire_event("iq-"..stanza.attr.type.."/bare/"..stanza.attr.id, data);
 		return true;
 	end
 end);
@@ -49,7 +49,7 @@
 	if stanza.attr.type == "get" or stanza.attr.type == "set" then
 		return module:fire_event("iq/self/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
 	else
-		module:fire_event("iq/self/"..stanza.attr.id, data);
+		module:fire_event("iq-"..stanza.attr.type.."/self/"..stanza.attr.id, data);
 		return true;
 	end
 end);
@@ -61,7 +61,7 @@
 	if stanza.attr.type == "get" or stanza.attr.type == "set" then
 		return module:fire_event("iq/host/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
 	else
-		module:fire_event("iq/host/"..stanza.attr.id, data);
+		module:fire_event("iq-"..stanza.attr.type.."/host/"..stanza.attr.id, data);
 		return true;
 	end
 end);

mercurial