aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2010-02-12 03:50:44 +0500
committerWaqas Hussain <waqas20@gmail.com>2010-02-12 03:50:44 +0500
commit4233a8ccf51fb5a0f5baeb0f3cc674cc2d12fc67 (patch)
tree7e070b481bf7ec4eb91ca14bbc5df9d29f72d417 /plugins
parent8946ed6f6cb099e9517d3fa66368fb818223197c (diff)
downloadprosody-4233a8ccf51fb5a0f5baeb0f3cc674cc2d12fc67.tar.gz
prosody-4233a8ccf51fb5a0f5baeb0f3cc674cc2d12fc67.zip
mod_tls: Hook stream-features event using new events API.
Diffstat (limited to 'plugins')
-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);