MUC: Fix delay@from to be room JID (fixes #1416)

This commit is contained in:
Kim Alvefur 2019-08-31 16:08:45 +02:00
parent 708f1a00bf
commit 66f5741a5f

View file

@ -178,10 +178,10 @@ module:hook("muc-add-history", function(event)
local ts = gettime();
local stamp = datetime.datetime(ts);
stanza:tag("delay", { -- XEP-0203
xmlns = "urn:xmpp:delay", from = module.host, stamp = stamp
xmlns = "urn:xmpp:delay", from = room.jid, stamp = stamp
}):up();
stanza:tag("x", { -- XEP-0091 (deprecated)
xmlns = "jabber:x:delay", from = module.host, stamp = datetime.legacy()
xmlns = "jabber:x:delay", from = room.jid, stamp = datetime.legacy()
}):up();
local entry = { stanza = stanza, timestamp = ts };
table.insert(history, entry);