aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-02-21 17:47:49 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-02-21 17:47:49 +0500
commit6708e06e7b075621e443d5795e95371497638d01 (patch)
tree8ced6f75db9600f2d6eba65d5e4fd8c8c6ca8473 /plugins
parent8f7e7b390d6c621e6ca51a9d17cf75a5a3c1802c (diff)
parente6ee9308ba9da8c2c7ab9e58bf2cb121b71e62af (diff)
downloadprosody-6708e06e7b075621e443d5795e95371497638d01.tar.gz
prosody-6708e06e7b075621e443d5795e95371497638d01.zip
Merge with 0.7.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_iq.lua12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/mod_iq.lua b/plugins/mod_iq.lua
index 5be04533..0e1dadfc 100644
--- a/plugins/mod_iq.lua
+++ b/plugins/mod_iq.lua
@@ -53,6 +53,18 @@ module:hook("iq/bare", function(data)
end
end);
+module:hook("iq/self", function(data)
+ -- IQ to bare JID recieved
+ local origin, stanza = data.origin, data.stanza;
+
+ 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);
+ return true;
+ end
+end);
+
module:hook("iq/host", function(data)
-- IQ to a local host recieved
local origin, stanza = data.origin, data.stanza;