From: Holger Weiss Date: Thu, 24 Nov 2016 09:47:26 +0000 (+0100) Subject: Use xmpp:put_meta/3 to update metadata X-Git-Tag: 16.12-beta1~11^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=560038c808cafe08e0cc5c6abb431e1e82f02f88;p=ejabberd Use xmpp:put_meta/3 to update metadata --- diff --git a/src/ejabberd_sm.erl b/src/ejabberd_sm.erl index b3953ec49..d40db28cc 100644 --- a/src/ejabberd_sm.erl +++ b/src/ejabberd_sm.erl @@ -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.