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
commite4b27b4e7a5e21fc272c9b33d4184a94df7e76d1 (patch)
tree3b9d1d6d5cf093f004b3527c925b2df736476744 /plugins/muc/history.lib.lua
parent4e91846a0bcb35d7c586397c1d3e96147b2bae5f (diff)
downloadprosody-e4b27b4e7a5e21fc272c9b33d4184a94df7e76d1.tar.gz
prosody-e4b27b4e7a5e21fc272c9b33d4184a94df7e76d1.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