Software /
code /
prosody
Diff
plugins/muc/muc.lib.lua @ 8474:7ad9d7c4161c
MUC: fix the @from on <delay/> in history replay (fixes #1054)
author | Jonas Wielicki <jonas@wielicki.name> |
---|---|
date | Sat, 09 Dec 2017 17:36:47 +0100 |
parent | 8465:0ec72e67f797 |
child | 8475:eb85b10e1fea |
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua Sat Dec 09 14:39:48 2017 +0100 +++ b/plugins/muc/muc.lib.lua Sat Dec 09 17:36:47 2017 +0100 @@ -135,8 +135,8 @@ stanza = st.clone(stanza); stanza.attr.to = ""; local stamp = datetime.datetime(); - stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = muc_domain, stamp = stamp}):up(); -- XEP-0203 - stanza:tag("x", {xmlns = "jabber:x:delay", from = muc_domain, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated) + stanza:tag("delay", {xmlns = "urn:xmpp:delay", from = self.jid, stamp = stamp}):up(); -- XEP-0203 + stanza:tag("x", {xmlns = "jabber:x:delay", from = self.jid, stamp = datetime.legacy()}):up(); -- XEP-0091 (deprecated) local entry = { stanza = stanza, stamp = stamp }; t_insert(history, entry); while #history > (self._data.history_length or default_history_length) do t_remove(history, 1) end