aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2019-03-04 12:56:31 +0100
committerKim Alvefur <zash@zash.se>2019-03-04 12:56:31 +0100
commitdad8bb5feebd8d32c1d4172d205b871e824d42b8 (patch)
tree90e8f13bc3ad080e0fc20250ecdbfc7c61ba6ba8 /plugins
parent5d4504e51b8d1e77b20fffaf60cd7f2bdb80785a (diff)
downloadprosody-dad8bb5feebd8d32c1d4172d205b871e824d42b8.tar.gz
prosody-dad8bb5feebd8d32c1d4172d205b871e824d42b8.zip
mod_muc_mam: Strip the stanza 'to' attribute (fixes #1259)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/mod_muc_mam.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/plugins/mod_muc_mam.lua b/plugins/mod_muc_mam.lua
index 166a5c71..c92e22cd 100644
--- a/plugins/mod_muc_mam.lua
+++ b/plugins/mod_muc_mam.lua
@@ -208,6 +208,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);
@@ -329,6 +330,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);