]> granicus.if.org Git - ejabberd/commitdiff
prosody2ejabberd: Fix message attribute removal
authorHolger Weiss <holger@zedat.fu-berlin.de>
Tue, 21 Mar 2017 17:23:55 +0000 (18:23 +0100)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Tue, 21 Mar 2017 17:23:55 +0000 (18:23 +0100)
Actually remove the 'stamp' and 'stamp_legacy' attributes from imported
offline messages as intended.

src/prosody2ejabberd.erl

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