From 15ddd00ad455e77c976dfc2ea043b3511e86ce20 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Tue, 3 Mar 2015 07:14:25 +0100 Subject: [PATCH] mod_mam: Specify namespace for MAM messages The "jabber:client" namespace must be explicitly specified for MAM messages, as they would otherwise inherit the "urn:xmpp:forward:0" namespace. --- mod_mam/src/mod_mam.erl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mod_mam/src/mod_mam.erl b/mod_mam/src/mod_mam.erl index ff18256..7d141f5 100644 --- a/mod_mam/src/mod_mam.erl +++ b/mod_mam/src/mod_mam.erl @@ -867,7 +867,9 @@ send_mam_message(#jid{luser = U, lserver = S} = JID, QueryID, attrs = [{<<"xmlns">>, ?NS_HINTS}]}, Forwarded = #xmlel{name = <<"forwarded">>, attrs = [{<<"xmlns">>, ?NS_FORWARD}], - children = [Stanza]}, + children = [xml:replace_tag_attr(<<"xmlns">>, + <<"jabber:client">>, + Stanza)]}, Result = #xmlel{name = <<"result">>, attrs = [{<<"xmlns">>, ?NS_MAM}, {<<"id">>, jlib:integer_to_binary(MamID)}]