From e4b27b4e7a5e21fc272c9b33d4184a94df7e76d1 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Fri, 3 Aug 2018 17:48:41 +0200 Subject: MUC: Split long lines [luacheck strict] --- plugins/muc/history.lib.lua | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'plugins/muc/history.lib.lua') 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 -- cgit v1.2.3