mod_rest: Provide a log function on temporary session
authorKim Alvefur <zash@zash.se>
Sun, 29 May 2022 02:02:07 +0200
changeset 4959 537054999093
parent 4958 e8a487c42b36
child 4960 65870d42a7b1
mod_rest: Provide a log function on temporary session Fixes traceback in places using session.log()
mod_rest/mod_rest.lua
--- a/mod_rest/mod_rest.lua	Sat May 28 16:43:04 2022 +0200
+++ b/mod_rest/mod_rest.lua	Sun May 29 02:02:07 2022 +0200
@@ -305,6 +305,7 @@
 		end
 		from = jid.join(origin.username, origin.host, origin.resource);
 		origin.type = "c2s";
+		origin.log = module._log;
 	end
 	local payload, err = parse_request(request, path);
 	if not payload then