Diff

mod_http_muc_log/mod_http_muc_log.lua @ 3715:f03a023cd523

mod_http_muc_log: Compose page title from room data More flexible than composing the title from name and date in the controller. Also opens the door to using other room data fields.
author Kim Alvefur <zash@zash.se>
date Sun, 13 Oct 2019 16:16:14 +0200
parent 3714:04ff0de40ba9
child 3718:cc6f7e2e4a59
line wrap: on
line diff
--- a/mod_http_muc_log/mod_http_muc_log.lua	Sun Oct 13 16:00:16 2019 +0200
+++ b/mod_http_muc_log/mod_http_muc_log.lua	Sun Oct 13 16:16:14 2019 +0200
@@ -240,7 +240,7 @@
 
 	response.headers.content_type = "text/html; charset=utf-8";
 	return render(template, {
-		title = get_room(room):get_name();
+		room = get_room(room)._data;
 		jid = get_room(room).jid;
 		jid_node = jid_split(get_room(room).jid);
 		hide_presence = hide_presence(request);
@@ -376,8 +376,8 @@
 
 	response.headers.content_type = "text/html; charset=utf-8";
 	return render(template, {
-		title = ("%s - %s"):format(get_room(room):get_name(), date);
 		date = date;
+		room = get_room(room)._data;
 		jid = get_room(room).jid;
 		jid_node = jid_split(get_room(room).jid);
 		hide_presence = hide_presence(request);