]> granicus.if.org Git - ejabberd/commitdiff
mod_push: Also include sender/body for carbons
authorHolger Weiss <holger@zedat.fu-berlin.de>
Tue, 12 Jun 2018 20:47:23 +0000 (22:47 +0200)
committerHolger Weiss <holger@zedat.fu-berlin.de>
Tue, 12 Jun 2018 20:47:23 +0000 (22:47 +0200)
If the 'include_sender' and/or 'include_body' options are specified,
also include a urn:xmpp:push:summary form in push notifications that are
generated for carbon-copied messages (with a body).

src/mod_push.erl

index 077556ffd752ad7f47f9a4705da5a0458bcda985..eb06e41b0e80c3c9a0611b441b6be3aa64f71a21 100644 (file)
@@ -346,7 +346,7 @@ c2s_stanza(State, #stream_error{}, _SendResult) ->
 c2s_stanza(#{push_enabled := true, mgmt_state := pending} = State,
           Pkt, _SendResult) ->
     ?DEBUG("Notifying client of stanza", []),
-    notify(State, Pkt),
+    notify(State, xmpp_util:unwrap_carbon(Pkt)),
     State;
 c2s_stanza(State, _Pkt, _SendResult) ->
     State.