diff options
author | Kim Alvefur <zash@zash.se> | 2019-04-03 17:20:57 +0200 |
---|---|---|
committer | Kim Alvefur <zash@zash.se> | 2019-04-03 17:20:57 +0200 |
commit | 392eac3c621a11d30d9e42803faaf93cdb48d83d (patch) | |
tree | c6011cc2a5b85ea0ecd4182214be9cd76e1ba287 | |
parent | 049663349e8123008c98a08d6016cf6c9c7e30a2 (diff) | |
download | prosody-392eac3c621a11d30d9e42803faaf93cdb48d83d.tar.gz prosody-392eac3c621a11d30d9e42803faaf93cdb48d83d.zip |
util.session: Fix session id not include unauthed forever
-rw-r--r-- | util/session.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/util/session.lua b/util/session.lua index b2a726ce..b9c6bec7 100644 --- a/util/session.lua +++ b/util/session.lua @@ -4,12 +4,13 @@ local logger = require "util.logger"; local function new_session(typ) local session = { type = typ .. "_unauthed"; + base_type = typ; }; return session; end local function set_id(session) - local id = session.type .. tostring(session):match("%x+$"):lower(); + local id = session.base_type .. tostring(session):match("%x+$"):lower(); session.id = id; return session; end |