changeset 3893:3f20b7c88afb

mod_http_muc_log: Expose JID localpart to the template
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Mon, 17 Feb 2020 21:50:55 +0100
parents 96a2e5097fc4
children 14a32224900c
files mod_http_muc_log/mod_http_muc_log.lua
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua	Mon Feb 17 21:49:15 2020 +0100
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Mon Feb 17 21:50:55 2020 +0100
@@ -412,9 +412,11 @@
 	local room_list, i = {}, 1;
 	for room in each_room() do
 		if not (room.get_hidden or room.is_hidden)(room) then
+			local localpart = jid_split(room.jid);
 			room_list[i], i = {
 				jid = room.jid;
-				href = get_link(jid_split(room.jid), default_view);
+				localpart = localpart;
+				href = get_link(localpart, default_view);
 				name = room:get_name();
 				lang = room.get_language and room:get_language();
 				description = room:get_description();