# HG changeset patch # User Matthew Wild # Date 1266770635 0 # Node ID 6863b629aa6a9d83ade522e3d98d5f859e5ba599 # Parent 21e486ba40297372618276fed8f04f097c3f1919# Parent 542d633e0280c97cc7de712376848c879bc26280 Merge 0.7 with 0.7 with trunk \o/ diff -r 21e486ba4029 -r 6863b629aa6a core/stanza_router.lua --- a/core/stanza_router.lua Sun Feb 21 16:43:05 2010 +0000 +++ b/core/stanza_router.lua Sun Feb 21 16:43:55 2010 +0000 @@ -140,6 +140,7 @@ to_type = '/host'; else to_type = '/bare'; + to_self = true; end end diff -r 21e486ba4029 -r 6863b629aa6a plugins/mod_iq.lua --- a/plugins/mod_iq.lua Sun Feb 21 16:43:05 2010 +0000 +++ b/plugins/mod_iq.lua Sun Feb 21 16:43:55 2010 +0000 @@ -53,6 +53,18 @@ 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;