aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-06-02 20:18:02 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-06-02 20:18:02 +0500
commite164f64e2a0505ab83ec8fdd1c5c815f0bd84164 (patch)
treef2c75a9414be91482399f9b660a3918a7f7cc8bd
parent00f021695cb9253a6a33f00a06e3036041a47a92 (diff)
downloadprosody-e164f64e2a0505ab83ec8fdd1c5c815f0bd84164.tar.gz
prosody-e164f64e2a0505ab83ec8fdd1c5c815f0bd84164.zip
mod_iq: Limit sub-events to get and set IQs
-rw-r--r--plugins/mod_iq.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/plugins/mod_iq.lua b/plugins/mod_iq.lua
index 73e5688e..ed89688a 100644
--- a/plugins/mod_iq.lua
+++ b/plugins/mod_iq.lua
@@ -37,7 +37,7 @@ module:hook("iq/bare", function(data)
end
end
-- TODO fire post processing events
- if #stanza.tags == 1 then
+ 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
@@ -48,7 +48,7 @@ module:hook("iq/host", function(data)
-- IQ to a local host recieved
local origin, stanza = data.origin, data.stanza;
- if #stanza.tags == 1 then
+ 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