Changeset

1421:7dafb3bae02b

mod_iq: Change sub-event names for IQ errors and results to use stanza IDs
author Waqas Hussain <waqas20@gmail.com>
date Fri, 26 Jun 2009 10:02:46 +0500
parents 1420:1576a5aa52f8
children 1422:db9cb1f24f38 1424:6969ad97ca58
files plugins/mod_iq.lua
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_iq.lua	Fri Jun 26 05:54:55 2009 +0100
+++ b/plugins/mod_iq.lua	Fri Jun 26 10:02:46 2009 +0500
@@ -40,7 +40,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.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
+		module:fire_event("iq/bare/"..stanza.attr.id, data);
 		return true;
 	end
 end);
@@ -52,7 +52,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.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
+		module:fire_event("iq/host/"..stanza.attr.id, data);
 		return true;
 	end
 end);