Software /
code /
prosody
Diff
util/session.lua @ 9947:8ebca1240203
util.session: Fix session id not include unauthed forever
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 03 Apr 2019 17:20:57 +0200 |
parent | 7181:8af558965da3 |
child | 10110:3fa3872588a8 |
line wrap: on
line diff
--- a/util/session.lua Wed Apr 03 01:09:21 2019 +0200 +++ b/util/session.lua Wed Apr 03 17:20:57 2019 +0200 @@ -4,12 +4,13 @@ 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