Software /
code /
prosody
Changeset
7896:1a2674123c1c
mod_saslauth: Cache logger in local for less typing
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 15 Feb 2017 22:59:19 +0100 |
parents | 7895:1e1c18012048 |
children | 7897:08bde6a6fd56 |
files | plugins/mod_saslauth.lua |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/plugins/mod_saslauth.lua Wed Feb 15 15:30:34 2017 +0100 +++ b/plugins/mod_saslauth.lua Wed Feb 15 22:59:19 2017 +0100 @@ -223,6 +223,7 @@ local xmpp_session_attr = { xmlns='urn:ietf:params:xml:ns:xmpp-session' }; module:hook("stream-features", function(event) local origin, features = event.origin, event.features; + local log = origin.log or log; if not origin.username then if secure_auth_only and not origin.secure then return; @@ -251,7 +252,7 @@ if mechanisms[1] then features:add_child(mechanisms); else - (origin.log or log)("warn", "No SASL mechanisms to offer"); + log("warn", "No SASL mechanisms to offer"); end else features:tag("bind", bind_attr):tag("required"):up():up();