Wed, 15 Dec 2010 14:52:37 +0000
verse.client: Fire 'stanza-out' and {message,presence,iq}'-out' for outgoing stanzas
client.lua | file | annotate | diff | comparison | revisions |
--- a/client.lua Wed Dec 15 14:50:10 2010 +0000 +++ b/client.lua Wed Dec 15 14:52:37 2010 +0000 @@ -107,6 +107,18 @@ return ret; end, -1); + self:hook("outgoing", function (data) + if data.name then + self:event("stanza-out", data); + end + end); + + self:hook("stanza-out", function (stanza) + if not stanza.attr.xmlns then + self:event(stanza.name.."-out", stanza); + end + end); + local function stream_ready() self:event("ready"); end