aboutsummaryrefslogtreecommitdiffstats
path: root/util/session.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-04-03 17:20:57 +0200
committerKim Alvefur <zash@zash.se>2019-04-03 17:20:57 +0200
commit392eac3c621a11d30d9e42803faaf93cdb48d83d (patch)
treec6011cc2a5b85ea0ecd4182214be9cd76e1ba287 /util/session.lua
parent049663349e8123008c98a08d6016cf6c9c7e30a2 (diff)
downloadprosody-392eac3c621a11d30d9e42803faaf93cdb48d83d.tar.gz
prosody-392eac3c621a11d30d9e42803faaf93cdb48d83d.zip
util.session: Fix session id not include unauthed forever
Diffstat (limited to 'util/session.lua')
-rw-r--r--util/session.lua3
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