annotate mod_compat_bind/mod_compat_bind.lua @ 1713:01e9465f8f80

mod_delegation: delegated features/identities removal for disco info requests on bare jid
author Goffi <goffi@goffi.org>
date Fri, 17 Apr 2015 21:06:51 +0200
parents f25b6a9f97bb
children 73fbfd1e820b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
748
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
1 -- Compatibility with clients that set 'to' on resource bind requests
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
2 --
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
3 -- http://xmpp.org/rfcs/rfc3920.html#bind
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
4 -- http://xmpp.org/rfcs/rfc6120.html#bind-servergen-success
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
5
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
6 local st = require "util.stanza";
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
7
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
8 module:hook("iq/host/urn:ietf:params:xml:ns:xmpp-bind:bind", function(event)
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
9 local fixed_stanza = st.clone(event.stanza);
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
10 fixed_stanza.attr.to = nil;
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
11 core_process_stanza(event.origin, fixed_stanza);
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
12 return true;
f25b6a9f97bb mod_compat_bind: Compatibility (ugh) with clients that send the resource bind to the login host (ugh)
Matthew Wild <mwild1@gmail.com>
parents:
diff changeset
13 end);