util.session: Add role management methods

This commit is contained in:
Matthew Wild 2022-06-15 11:37:09 +01:00
parent 1f4c6548dc
commit 7ebea134e6

View file

@ -57,10 +57,16 @@ local function set_send(session)
return session; return session;
end end
local function set_role(session, role)
session.role = role;
end
return { return {
new = new_session; new = new_session;
set_id = set_id; set_id = set_id;
set_logger = set_logger; set_logger = set_logger;
set_conn = set_conn; set_conn = set_conn;
set_send = set_send; set_send = set_send;
set_role = set_role;
} }