X-Git-Url: https://git.enpas.org/?a=blobdiff_plain;f=plugins%2Fmod_iq.lua;h=5be045335c478e256913228207d31fc76b6f3719;hb=7457d58d551120e47eb5bcac81028108cff199de;hp=0faebaf93772656912f8e3339c5838c9d933fdda;hpb=9eed1c3222c2c7f2ab544b17d0ac5f268f0d4a5a;p=prosody.git diff --git a/plugins/mod_iq.lua b/plugins/mod_iq.lua index 0faebaf9..5be04533 100644 --- a/plugins/mod_iq.lua +++ b/plugins/mod_iq.lua @@ -1,3 +1,11 @@ +-- Prosody IM +-- Copyright (C) 2008-2009 Matthew Wild +-- Copyright (C) 2008-2009 Waqas Hussain +-- +-- This project is MIT/X11 licensed. Please see the +-- COPYING file in the source package for more information. +-- + local st = require "util.stanza"; local jid_split = require "util.jid".split; @@ -40,7 +48,7 @@ module:hook("iq/bare", function(data) 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 +60,7 @@ module:hook("iq/host", function(data) 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);