mod_tls: Remove origin type check when TLS is requested (thanks MattJ).
[prosody.git] / plugins / mod_tls.lua
index 9214dd1206fd3e38a78e824cd6ce8bc93af30215..90985874f0954a6b0b912d188ab455cb85081671 100644 (file)
@@ -18,7 +18,7 @@ local global_ssl_ctx = prosody.global_ssl_ctx;
 
 module:hook("stanza/urn:ietf:params:xml:ns:xmpp-tls:starttls", function(event)
        local origin = event.origin;
-       if origin.conn.starttls and origin.type == "c2s_unauthed" or origin.type == "s2sin_unauthed" then
+       if origin.conn.starttls then
                (origin.sends2s or origin.send)(st.stanza("proceed", { xmlns = xmlns_starttls }));
                origin:reset_stream();
                local host = origin.to_host or origin.host;