mod_invites_adhoc: Fail contact invite if user is not on current host
Only the username was being used, and the host of the requester ignored.
Luckily this only affects admins of the host. If they want to create an
account they can use the other command. If they want to create a contact
they should request from their account on this host.
local hostname = module:get_option_string("sasl_hostname", module.host);
module:hook("stream-features", function(event)
local features = event.features;
local mechs = features:get_child("mechanisms", "urn:ietf:params:xml:ns:xmpp-sasl");
if mechs then
mechs:tag("hostname", { xmlns = "urn:xmpp:domain-based-name:1" })
:text(hostname):up();
end
end);