# HG changeset patch # User Kim Alvefur # Date 1623770365 -7200 # Node ID 45ab9152a51c28302233e0e84f4a6bc184390453 # Parent e7b126161e7b3a1865c2c762b87077ec42586ed4 mod_http_muc_log: Add some spacing around code for readability diff -r e7b126161e7b -r 45ab9152a51c mod_http_muc_log/mod_http_muc_log.lua --- a/mod_http_muc_log/mod_http_muc_log.lua Tue Jun 15 12:35:17 2021 +0100 +++ b/mod_http_muc_log/mod_http_muc_log.lua Tue Jun 15 17:19:25 2021 +0200 @@ -316,6 +316,7 @@ local subject = item:get_child_text("subject"); local verb = nil; local lang = body_tag and body_tag.attr["xml:lang"] or item.attr["xml:lang"]; + if subject then verb, body = "set the topic to", subject; elseif body and body:sub(1,4) == "/me " then @@ -325,7 +326,9 @@ verb = item.attr.type == "unavailable" and "has left" or "has joined"; lang = "en"; end + local oob = use_oob and item:get_child("x", "jabber:x:oob"); + if body or verb or oob then local line = { key = key; @@ -346,6 +349,7 @@ end logs[i], i = line, i + 1; end + first = first or key; last = key; end