MUC: fix the @from on <delay/> in history replay (fixes #1054)
authorJonas Wielicki <jonas@wielicki.name>
Sat, 09 Dec 2017 17:36:47 +0100
changeset 8477 7ad9d7c4161c
parent 8468 0ec72e67f797
child 8478 eb85b10e1fea
MUC: fix the @from on <delay/> in history replay (fixes #1054)
plugins/muc/muc.lib.lua
--- 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