aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/history.lib.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2018-08-03 17:48:41 +0200
committerKim Alvefur <zash@zash.se>2018-08-03 17:48:41 +0200
commit9bc2a2e2ff78ed5a8e6f05009ff0d32f1442e529 (patch)
tree3b9d1d6d5cf093f004b3527c925b2df736476744 /plugins/muc/history.lib.lua
parent4d70f3f2a9d3495c5be873298a995816fe8467ec (diff)
downloadprosody-9bc2a2e2ff78ed5a8e6f05009ff0d32f1442e529.tar.gz
prosody-9bc2a2e2ff78ed5a8e6f05009ff0d32f1442e529.zip
MUC: Split long lines [luacheck strict]
Diffstat (limited to 'plugins/muc/history.lib.lua')
-rw-r--r--plugins/muc/history.lib.lua8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/muc/history.lib.lua b/plugins/muc/history.lib.lua
index 8a1163cf..445aacb9 100644
--- a/plugins/muc/history.lib.lua
+++ b/plugins/muc/history.lib.lua
@@ -177,8 +177,12 @@ module:hook("muc-add-history", function(event)
stanza.attr.to = "";
local ts = gettime();
local stamp = datetime.datetime(ts);
- stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = module.host, stamp = stamp}):up(); -- XEP-0203
- stanza:tag("x", {xmlns = "jabber:x:delay", from = module.host, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated)
+ stanza:tag("delay", { -- XEP-0203
+ xmlns = "urn:xmpp:delay", from = module.host, stamp = stamp
+ }):up();
+ stanza:tag("x", { -- XEP-0091 (deprecated)
+ xmlns = "jabber:x:delay", from = module.host, stamp = datetime.legacy()
+ }):up();
local entry = { stanza = stanza, timestamp = ts };
table.insert(history, entry);
while #history > get_historylength(room) do table.remove(history, 1) end