aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-03-04 13:46:09 +0100
committerKim Alvefur <zash@zash.se>2019-03-04 13:46:09 +0100
commit55393a584dc5d401ca1fc82f5be5b21c7bc6ea07 (patch)
treee47cbfb67c4f98b179baec19c2f4fd66e62f7132 /plugins
parent37ba8188057989a530aa5a5e138b181d1ad855a1 (diff)
parent01f4b12e155b549fedc814f2c63b58d5ea72e201 (diff)
downloadprosody-55393a584dc5d401ca1fc82f5be5b21c7bc6ea07.tar.gz
prosody-55393a584dc5d401ca1fc82f5be5b21c7bc6ea07.zip
Merge 0.11->trunk
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_muc_mam.lua5
1 files changed, 4 insertions, 1 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua
index 963e5255..d414a449 100644
--- a/plugins/mod_muc_mam.lua
+++ b/plugins/mod_muc_mam.lua
@@ -213,6 +213,7 @@ module:hook("iq-set/bare/"..xmlns_mam..":query", function(event)
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 @@ local function save_to_history(self, stanza)
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 @@ local function save_to_history(self, stanza)
-- 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