]> granicus.if.org Git - ejabberd/commitdiff
Use xmpp:put_meta/3 to update metadata
authorHolger Weiss <holger@zedat.fu-berlin.de>
Thu, 24 Nov 2016 09:47:26 +0000 (10:47 +0100)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Thu, 24 Nov 2016 09:47:26 +0000 (10:47 +0100)
src/ejabberd_sm.erl

index b3953ec49abfb1c850bdea85cca10b3fb3673343..d40db28cc3f6db97c067e18913f0e70473488d27 100644 (file)
@@ -613,8 +613,7 @@ route_message(From, To, Packet, Type) ->
 maybe_mark_as_copy(Packet, R, R, P, P) ->
     Packet;
 maybe_mark_as_copy(Packet, _, _, P, P) ->
-    Meta = Packet#message.meta,
-    Packet#message{meta = Meta#{sm_copy => true}};
+    xmpp:put_meta(Packet, sm_copy, true);
 maybe_mark_as_copy(Packet, _, _, _, _) ->
     Packet.