aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/muc/history.lib.lua
diff options
context:
space:
mode:
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