Diff

plugins/mod_iq.lua @ 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
parent 1288:d2dc0954ebfd
child 1421:7dafb3bae02b
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);