plugins/mod_saslauth.lua
changeset 7963 9a938b785bc5
parent 7943 e520dc0c3af4
child 7965 4e9b307c30dd
--- a/plugins/mod_saslauth.lua	Mon Mar 06 15:55:37 2017 +0100
+++ b/plugins/mod_saslauth.lua	Mon Mar 06 15:56:12 2017 +0100
@@ -82,7 +82,7 @@
 	return true;
 end
 
-module:hook_stanza(xmlns_sasl, "success", function (session, stanza)
+module:hook_tag(xmlns_sasl, "success", function (session, stanza)
 	if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end
 	module:log("debug", "SASL EXTERNAL with %s succeeded", session.to_host);
 	session.external_auth = "succeeded"
@@ -93,7 +93,7 @@
 	return true;
 end)
 
-module:hook_stanza(xmlns_sasl, "failure", function (session, stanza)
+module:hook_tag(xmlns_sasl, "failure", function (session, stanza)
 	if session.type ~= "s2sout_unauthed" or session.external_auth ~= "attempting" then return; end
 
 	local text = stanza:get_child_text("text");
@@ -114,7 +114,7 @@
 	return true;
 end, 500)
 
-module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza)
+module:hook_tag("http://etherx.jabber.org/streams", "features", function (session, stanza)
 	if session.type ~= "s2sout_unauthed" or not session.secure then return; end
 
 	local mechanisms = stanza:get_child("mechanisms", xmlns_sasl)