# HG changeset patch # User Kim Alvefur # Date 1415458489 -3600 # Node ID 1b2823b41f7f91d560aa934f8f171acdbd7669bd # Parent f9f8bf82ece71ac4dbe3bc7e927b98b41412d214 mod_http_muc_log: Strip some whitespace diff -r f9f8bf82ece7 -r 1b2823b41f7f mod_http_muc_log/mod_http_muc_log.lua --- a/mod_http_muc_log/mod_http_muc_log.lua Sat Nov 08 15:51:57 2014 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Sat Nov 08 15:54:49 2014 +0100 @@ -75,13 +75,13 @@ local dates_template = template(base{ title = "Logs for room {room}"; body = [[ - - - - ]]; + + + +]]; }) local date_line_template = template[[ @@ -91,39 +91,39 @@ local page_template = template(base{ title = "Logs for room {room} on {date}"; body = [[ - - - ]]; + + +]]; }); local line_templates = { ["message
{nick}
{body}
- ]]; +
  • {nick}
    {body}
  • +]]; ["message
    {nick}
    changed subject to {subject}
    - ]]; +
  • {nick}
    changed subject to {subject}
  • +]]; ["presence"] = template[[ -
  • {nick}
    joined
  • - ]]; +
  • {nick}
    joined
  • +]]; ["presence
    {nick}
    left
    - ]]; +
  • {nick}
    left
  • +]]; }; local room_list_template = template(base{ title = "Rooms on {host}"; body = [[ -
    - {rooms!} -
    - ]]; +
    +{rooms!} +
    +]]; }); local room_item_template = template[[ @@ -221,20 +221,20 @@ ["start"] = datetime.parse(date.."T00:00:00Z") + 86401; limit = math.huge; }) do - next_when = when; - module:log("debug", "Next message: %s", datetime.datetime(when)); - break; -end + next_when = when; + module:log("debug", "Next message: %s", datetime.datetime(when)); + break; + end -module:log("debug", "Find prev date with messages"); -for key, message, when in archive:find(room, { - ["end"] = datetime.parse(date.."T00:00:00Z") - 1; - limit = math.huge; - reverse = true; -}) do -prev_when = when; -module:log("debug", "Previous message: %s", datetime.datetime(when)); -break; + module:log("debug", "Find prev date with messages"); + for key, message, when in archive:find(room, { + ["end"] = datetime.parse(date.."T00:00:00Z") - 1; + limit = math.huge; + reverse = true; + }) do + prev_when = when; + module:log("debug", "Previous message: %s", datetime.datetime(when)); + break; end return page_template{