Mercurial > prosody-modules
comparison mod_compat_bind/mod_compat_bind.lua @ 753:9d5731af2c27
Merge with Oliver Gerlich
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 27 Jul 2012 14:29:59 +0100 |
parents | f25b6a9f97bb |
children | 73fbfd1e820b |
comparison
equal
deleted
inserted
replaced
752:9bbd99f2057a | 753:9d5731af2c27 |
---|---|
1 -- Compatibility with clients that set 'to' on resource bind requests | |
2 -- | |
3 -- http://xmpp.org/rfcs/rfc3920.html#bind | |
4 -- http://xmpp.org/rfcs/rfc6120.html#bind-servergen-success | |
5 | |
6 local st = require "util.stanza"; | |
7 | |
8 module:hook("iq/host/urn:ietf:params:xml:ns:xmpp-bind:bind", function(event) | |
9 local fixed_stanza = st.clone(event.stanza); | |
10 fixed_stanza.attr.to = nil; | |
11 core_process_stanza(event.origin, fixed_stanza); | |
12 return true; | |
13 end); |