Software /
code /
prosody
Diff
plugins/mod_tls.lua @ 6302:76699a0ae4c4
mod_lastactivity, mod_legacyauth, mod_presence, mod_saslauth, mod_tls: Use the newer stanza:get_child APIs and optimize away some table lookups
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Fri, 04 Jul 2014 22:52:34 +0200 |
parent | 6296:66fb7b7c668d |
child | 6487:edc63dc72566 |
line wrap: on
line diff
--- a/plugins/mod_tls.lua Fri Jul 04 21:48:25 2014 +0200 +++ b/plugins/mod_tls.lua Fri Jul 04 22:52:34 2014 +0200 @@ -108,7 +108,7 @@ -- For s2sout connections, start TLS if we can module:hook_stanza("http://etherx.jabber.org/streams", "features", function (session, stanza) module:log("debug", "Received features element"); - if can_do_tls(session) and stanza:child_with_ns(xmlns_starttls) then + 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); session.sends2s("<starttls xmlns='"..xmlns_starttls.."'/>"); return true;