mod_tls: Switch to hook_tag from hook_stanza which was renamed in 2087d42f1e77
authorKim Alvefur <zash@zash.se>
Mon, 06 Mar 2017 15:55:37 +0100
changeset 7962 3941d609ff85
parent 7959 beaeafedc2d7
child 7963 9a938b785bc5
mod_tls: Switch to hook_tag from hook_stanza which was renamed in 2087d42f1e77
plugins/mod_tls.lua
--- a/plugins/mod_tls.lua	Mon Mar 06 15:27:37 2017 +0100
+++ b/plugins/mod_tls.lua	Mon Mar 06 15:55:37 2017 +0100
@@ -122,7 +122,7 @@
 end);
 
 -- For s2sout connections, start TLS if we can
-module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza)
+module:hook_tag("http://etherx.jabber.org/streams", "features", function (session, stanza)
 	module:log("debug", "Received features element");
 	if can_do_tls(session) and stanza:get_child("starttls", xmlns_starttls) then
 		module:log("debug", "%s is offering TLS, taking up the offer...", session.to_host);
@@ -131,7 +131,7 @@
 	end
 end, 500);
 
-module:hook_stanza(xmlns_starttls, "proceed", function (session, stanza) -- luacheck: ignore 212/stanza
+module:hook_tag(xmlns_starttls, "proceed", function (session, stanza) -- luacheck: ignore 212/stanza
 	if session.type == "s2sout_unauthed" and can_do_tls(session) then
 		module:log("debug", "Proceeding with TLS on s2sout...");
 		session:reset_stream();