Software /
code /
prosody
Diff
plugins/mod_muc_mam.lua @ 9845:774b2ce62318
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 04 Mar 2019 13:46:09 +0100 |
parent | 9844:3de80fc511ab |
parent | 9843:17060708d0eb |
child | 9872:e1d68f32ce29 |
line wrap: on
line diff
--- a/plugins/mod_muc_mam.lua Mon Mar 04 13:13:37 2019 +0100 +++ b/plugins/mod_muc_mam.lua Mon Mar 04 13:46:09 2019 +0100 @@ -213,6 +213,7 @@ if not is_stanza(item) then item = st.deserialize(item); end + item.attr.to = nil; item.attr.xmlns = "jabber:client"; fwd_st:add_child(item); @@ -334,6 +335,7 @@ if stanza.name == "message" and self:get_whois() == "anyone" then stored_stanza = st.clone(stanza); + stored_stanza.attr.to = nil; local actor = jid_bare(self._occupants[stanza.attr.from].jid); local affiliation = self:get_affiliation(actor) or "none"; local role = self:get_role(actor) or self:get_default_role(affiliation); @@ -344,12 +346,13 @@ -- Policy check if not archiving_enabled(self) then return end -- Don't log - -- And stash it + -- Save the type in the 'with' field, allows storing presence without conflicts local with = stanza.name if stanza.attr.type then with = with .. "<" .. stanza.attr.type end + -- And stash it local id = archive:append(room_node, nil, stored_stanza, time_now(), with); if id then