aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_tls.lua
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/mod_tls.lua')
-rw-r--r--plugins/mod_tls.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_tls.lua b/plugins/mod_tls.lua
index a17696c7..dfc1e338 100644
--- a/plugins/mod_tls.lua
+++ b/plugins/mod_tls.lua
@@ -42,8 +42,9 @@ module:hook("stanza/urn:ietf:params:xml:ns:xmpp-tls:starttls", function(event)
end);
-- Advertize stream feature
-module:add_event_hook("stream-features", function(session, features)
- if not session.username and session.conn.starttls then
+module:hook("stream-features", function(event)
+ local origin, features = event.origin, event.features;
+ if not origin.username and origin.conn.starttls then
features:add_child(c2s_feature);
end
end);