This module provides a built-in web interface to view chatroom logs stored by mod_muc_mam.
Same as any other module, be sure to include the HTML template
http_muc_log.html
alongside
mod_http_muc_log.lua
.
For example:
"conference.example.com" "muc"
Component = {
modules_enabled "muc_mam";
"http_muc_log";
}
= {
storage = "sql"; -- for example
muc_log }
The web interface would then be reachable at the address:
http://conference.example.com:5280/muc_log/
See the page about Prosodys HTTP server for info about the address.
The default HTML template lives in http_muc_log.html
in
the same directory as the module, but can be changed by setting
http_muc_log_template
to point to a different file. The
same template, with different input is used for every view.
The module uses util.interpolation
for rendering templates, with the pattern "%b{}"
and HTML /
XML escaping enabled.
To link to the latest day instead of calendar from the room listing page:
= "latest" http_muc_log_default_view
Inline images can optionally be shown. This is disabled by default for privacy reasons.
= true http_muc_log_show_images
The calendar view relies on an optional part of the Prosody archive storage API that provides a list of every valid date. If this is unavailable then the module queries for the first and the last messages and assumes that every date between those is valid. This may lead to many empty pages in case the logs are sparse.
This optimization can be turned off, to get a more accurate calendar view, but it will likely be very slow.
= false http_muc_log_lazy_calendar
The room list page is normally sorted by address, rooms having a description before those that don’t. To override this, or pin certain rooms to the top:
= {
http_muc_log_list_order "general@channels.example.com",
"support@channels.example.com",
}
Requires Prosody 0.11 or later and a storage backend with support for stanza archives. See mod_storage_muc_log for using legacy data from mod_muc_log.
With the plugin installer in Prosody 0.12 you can use:
sudo prosodyctl install --server=https://modules.prosody.im/rocks/ mod_http_muc_log
For earlier versions see the documentation for installing 3rd party modules