24
1
mirror of https://github.com/processone/ejabberd.git synced 2024-06-14 22:00:16 +02:00

prosody2ejabberd: Fix message attribute removal

Actually remove the 'stamp' and 'stamp_legacy' attributes from imported
offline messages as intended.
This commit is contained in:
Holger Weiss 2017-03-21 18:23:55 +01:00
parent f819272b88
commit a1068df602

View File

@ -337,8 +337,8 @@ el_to_offline_msg(LUser, LServer, #xmlel{attrs = Attrs} = El) ->
TS = xmpp_util:decode_timestamp( TS = xmpp_util:decode_timestamp(
fxml:get_attr_s(<<"stamp">>, Attrs)), fxml:get_attr_s(<<"stamp">>, Attrs)),
Attrs1 = lists:filter( Attrs1 = lists:filter(
fun(<<"stamp">>) -> false; fun({<<"stamp">>, _}) -> false;
(<<"stamp_legacy">>) -> false; ({<<"stamp_legacy">>, _}) -> false;
(_) -> true (_) -> true
end, Attrs), end, Attrs),
Packet = El#xmlel{attrs = Attrs1}, Packet = El#xmlel{attrs = Attrs1},