Diff

util/session.lua @ 10046:0bc291a5734a

Merge 0.11->trunk
author Kim Alvefur <zash@zash.se>
date Mon, 10 Jun 2019 13:22:22 +0200
parent 9947:8ebca1240203
child 10110:3fa3872588a8
line wrap: on
line diff
--- a/util/session.lua	Mon Jun 10 12:58:00 2019 +0200
+++ b/util/session.lua	Mon Jun 10 13:22:22 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