File

mod_saslname/mod_saslname.lua @ 2389:a753b21968c5

mod_firewall: README: Clarify that it's possible to jump to chains defined outside of the current file
author Matthew Wild <mwild1@gmail.com>
date Sat, 19 Nov 2016 16:01:51 +0000
parent 1271:e927d95512e8
line wrap: on
line source

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);