aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-04-12 17:30:16 +0200
committerKim Alvefur <zash@zash.se>2020-04-12 17:30:16 +0200
commit4120763d20fb8f2f19f7b9c2c789f34dc71c59ae (patch)
tree0db493505756ac73bdca26cd0876f250bd897b7e
parentb4bd0fc355b30083da874b2be0be5ee1e783b908 (diff)
downloadprosody-4120763d20fb8f2f19f7b9c2c789f34dc71c59ae.tar.gz
prosody-4120763d20fb8f2f19f7b9c2c789f34dc71c59ae.zip
mod_scansion_record: Indent stanzas in recordings
Improves readability, easier to see structure.
-rw-r--r--plugins/mod_scansion_record.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/mod_scansion_record.lua b/plugins/mod_scansion_record.lua
index 8d772b4e..0e109a0d 100644
--- a/plugins/mod_scansion_record.lua
+++ b/plugins/mod_scansion_record.lua
@@ -37,8 +37,7 @@ local function record_event(session, event)
end
local function record_stanza(stanza, session, verb)
- local flattened = tostring(stanza):gsub("><", ">\n\t<");
- -- TODO Proper prettyprinting with indentation
+ local flattened = tostring(stanza:indent(2, "\t"));
record(session.scansion_id.." "..verb..":\n\t"..flattened.."\n\n");
end