Changeset

1403:a1762cfd4d83

mod_iq: Fire sub-events for IQ results and errors
author Waqas Hussain <waqas20@gmail.com>
date Wed, 24 Jun 2009 20:05:17 +0500
parents 1402:34723bbd5acb
children 1404:12abd2da8885
files plugins/mod_iq.lua
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_iq.lua	Wed Jun 24 19:40:12 2009 +0500
+++ b/plugins/mod_iq.lua	Wed Jun 24 20:05:17 2009 +0500
@@ -40,7 +40,8 @@
 	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
-		return true; -- TODO do something with results and errors
+		module:fire_event("iq/bare/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
+		return true;
 	end
 end);
 
@@ -51,6 +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
-		return true; -- TODO do something with results and errors
+		module:fire_event("iq/host/"..stanza.tags[1].attr.xmlns..":"..stanza.tags[1].name, data);
+		return true;
 	end
 end);