Software / code / prosody
Comparison
plugins/mod_tls.lua @ 1896:e7ac9be5c90c
mod_tls: :up() out of the starttls tag in stream:features
| author | Matthew Wild <mwild1@gmail.com> |
|---|---|
| date | Sun, 04 Oct 2009 13:24:04 +0100 |
| parent | 1894:53f34ba6f6d6 |
| child | 1903:b7552b1e267d |
comparison
equal
deleted
inserted
replaced
| 1895:b7c838a1b0ca | 1896:e7ac9be5c90c |
|---|---|
| 57 module:add_event_hook("s2s-stream-features", | 57 module:add_event_hook("s2s-stream-features", |
| 58 function (session, features) | 58 function (session, features) |
| 59 -- This hook is possibly called once per host (at least if the | 59 -- This hook is possibly called once per host (at least if the |
| 60 -- remote server does not specify a to/from. | 60 -- remote server does not specify a to/from. |
| 61 if session.conn.starttls and not features:child_with_ns(xmlns_starttls) then | 61 if session.conn.starttls and not features:child_with_ns(xmlns_starttls) then |
| 62 features:tag("starttls", starttls_attr); | 62 features:tag("starttls", starttls_attr):up(); |
| 63 -- TODO: Make this optional :P | 63 -- TODO: Make this optional :P |
| 64 --features:tag("required"):up():up(); | 64 --features:tag("required"):up():up(); |
| 65 end | 65 end |
| 66 end); | 66 end); |
| 67 | 67 |